Sometimes you need to invoke a method whose name you won't know until runtime. In this episode, you'll learn the differences between #send, #public_send, and #send, gotchas of using them, …
Tag: metaprogramming

Episode #602
Module Builder Pattern – Part 2
Join guest Chris Salzberg as he demonstrates how to implement a foundational Ruby metaprogramming technique: the Module Builder pattern.

Episode #601
Module Builder Pattern – Part 1
Love it or hate it, metaprogramming is an undeniable part of Ruby programming lore and culture. In part one of two, join guest chef Chriz Salzberg in exploring how how …

Episode #595
Bindings and Local Variables
Learn how to use the power of Ruby's Binding objects to take precise control of the environment code is executed within!

Episode #591
Dynamic Inspect
When it comes to debugging, you can fight with Ruby's dynamic nature... Or you can embrace it. A little just-in-time metaprogramming can give you a clear window into unexpected behavior.

Episode #589
Mixed Argument Struct
Ruby is all about giving coders choices. What if you could give users of your code the choice between positional or keyword arguments, or some mix of the two? Let's …

Episode #566
Dynamic Understanding of Dynamic Systems
Ruby's open core classes can be modified at any time by any code you load. But this dynamism can work for you as well. Join guest Paul Stefan Ort for …

Episode #565
Parameter Destructuring
Learn about Ruby's method introspection features while re-creating JavaScript's parameter destructuring. Join guest chef Brandon Weaver for this mind- and language-expanding episode!

Episode #563
Explore and Extend – Part 2
Ruby's open classes are both powerful, and a fertile ground for creating technical debt. In part 2 of 2, rejoin guest chef Jordan Raine to discover how to responsibly monkey-patch …