Code to Joy
summary
Dives straight into runnable Ruby tricks: showing how aliasing to_ary to to_a lets a Struct both behave as an object and implicitly splat as multiple return values, benchmarking YAML::Store vs PStore for file persistence, turning yielders into iterables with method(:foo).to_enum and Pathname#ascend, using break with a return value to short‑circuit iteration while honoring ensure, and subclassing Module to build on‑the‑fly delegator modules via Module.new with define_method that actually works for multi‑target delegation.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:14Ruby makes programmers happy
- 3:20Splats and multiple returns
- 6:36YAML Store and P Store
- 9:47Methods into enumerators
- 13:20Early method exits
- 17:59Modules for delegation
- 24:08Joyful coding
- 25:59Q&A








