Yields self to the block, and then returns self. The primary purpose of this method is to “tap into” a method chain, in order to perform operations on intermediate results within the chain.
在 ruby 中,因為太過方便很常會用到 method chain,透過 tap 可以變得更 dry
實際上就是,透過 yield 將 block 帶過去,再透過 self 將自身帶回來
12345
# activesupport/lib/active_support/core_ext/object/misc.rb, line 53deftapyieldselfselfend