Under the Hood with the Ruby Object Model
In this lesson, we'll talk about Ruby's object model -- the way the code you write and objects you create are understood and structured by Ruby under the covers. This will be the backdrop against a more specific and practical idea: how we can use Ruby's metaprogramming facilities to make better, more concise, and more powerful code.
We'll talk about:
Ruby's object model
classes, eigenclasses, Ruby's inheritance tree vs. eigenclass graph
defining methods metaprogrammatically,
#define_method, and scope
#method_missing: the most important tools in the Ruby metaprogramming toolbox