My Meta Moments
summary
Metaprogramming is presented as learnable and fun and the concrete result is a working Putter gem that instruments code to log call site file/line, arguments and return values. It actually uses method_missing, define_method, `send`, `prepend`, singleton classes, `BasicObject` and `instance_exec` to wrap instances and override `new` so every created object can be followed. The demo prints real outputs, warns about cache invalidation, slower paths and harder tests, and shows the gem functioning on class and instance methods.
AI-written summary · about
chapters (7)
- 0:00Start
- 11:37INHERITANCE
- 13:12ANCESTORS
- 15:31METHOD DISPATCH
- 24:11SINGLETON CLASSES
- 27:00instance eval
- 29:19PUTTER
related talks
18mMetaprogramming: Unraveling the Magic
26mMeta-programming for Dummies
26mMeta-programming for Dummies
25mIn Defense of Ruby Metaprogramming
28mDiving into Dynamic: Demystefying Metaprogrammaing with Ruby
34mMetaprogramming for generalists
29mControl methods like a pro: A guide to Ruby's awesomeness, a.k.a. metaprogramming
33mMetaprogramming Isn't Real, It Can't Hurt You
