Discover how to use Ruby's yield_self/then method to organize methods into neat pipelines of operations! Join guest chef Nithin Bekal for an educational and satisfying refactoring sequence.
Tag: idioms

Episode #511: Minimum Viable Method
Is there such a thing as a method that is too small? Is it worth it to extract a method just to satisfy a guideline like the Law of Demeter?

Episode #483: Extract Default to Method
Some pointers on making your Ruby parameter defaults self-documenting.

Episode #482: Create and Extend
Learn a concise way to treat a module as an object in Ruby.

Episode #440: Detect Map
A tricky little functional programming puzzle, with an elegant solution.

Episode #438: Subscript Constructor
Eliminating astonishment with a special Ruby idiom for object creation.

Episode #436: Ruby 2.4 Destructuring Conditional
Ruby 2.4 eliminates an un-intuitive limitation of if-statements.

Episode #307: Command Loop
In this episode we'll build a simple command-prompt loop in Ruby.