DEV Community

Discussion on: Ruby 2.5 - Tap and Yield Self

Collapse
 
joellarsson profile image
Joel 🦇 Larsson

Great article! I've used this several times when I forgot about yield_self. Thanks very much for providing some simple use cases.

I also wanted to point out a typo in the line: .yield_self(&:shout), it should not contain the :. It should look like this to work: .yield_self(&shout). It got me confused why it didn't work for a while :)

Collapse
 
rpalo profile image
Ryan Palo

Thanks! I fixed it. I appreciate the heads up!