Katrina Owen contributed an example of coincidental duplication I liked so much I decided to make a second episode about it. Enjoy!
Category: Premium Episodes
Episode #090: class<<self
Ruby gives as a number of options when it comes to defining class methods. This episode starts by demonstrating three of them, and then gets a bit opinionated.
Episode #089: Coincidental Duplication
The DRY principle teaches us to get rid of duplication wherever we find it. But not all duplication is created equal...
Episode #088: Gem Love Part 5
In this continuation of the Gem-Love project, I complete the end-to-end acceptance test, verifying that the client can talk to the server. Source code here: https://github.com/avdi/gem-love/tree/rubytapas-088 Just a reminder, I'm collecting …
Episode #086: Naked Splat
In this episode we tackle how to override base class methods while cleanly passing through multiple base-class arguments. Notes: Paul Battley on Destructuring Assignment in Ruby
Episode #085: Ignore Arguments
Sometimes a block or method may receive arguments that you just don't care about. This episode introduces the idiomatic Ruby way to indicate that certain arguments should be ignored.
Episode #084: Splat Group
Today we take a look at a related feature to Ruby's "splat" operator: the ability to recursively destructure arrays using grouped assignment.
Episode #083: Custom Splat
In today's episode we discover how to make an arbitrary object implicitly "splat"-able.