The Case of the Missing Method — A Ruby Mystery Story
summary
Finds that a missing class method isn’t lost but stored on the class’s singleton class, discovered by inspecting ancestry and using a small where method to search ancestors; reproduces the surprise that creating one class increments ObjectSpace to 936 then 938 class objects in IRB; demonstrates tools Pry/IRB, object_space, singleton_class and instance_eval; builds a tiny DSL (city_instance) that scaffolds per-city classes via instance_eval and singleton classes and it works to localize custom behavior.
AI-written summary · about
chapters (11)
- 0:00Introduction
- 0:30Chapter 1 The Missing Method
- 3:17Jennys Notes
- 7:30The Case
- 11:33Chapter 3 The Missing Method
- 15:20Chapter 4 Case Closed
- 16:17Chapter 5 Ellen
- 18:24Chapter 6 Ellen
- 23:50Chapter 7 Singletons
- 27:00Chapter 8 Mike
- 29:47Chapter 9 Ellen
related talks
31mThe case of the missing method — a Ruby mystery story
29mThe Case of the Missing Method: A Ruby Mystery Story
33mThe Case Of The Missing Method - A Ruby Mystery Story
29mMessenger: The (Complete) Story of Method Lookup
33mVenturing into the Spooky Science of Ruby
18mMetaprogramming: Unraveling the Magic
29mModule Magic
30mRuby Objects: A Walkabout
