Ruby's Object Model and Eigenclasses
Writing an article about Ruby's object hierarchy and about eigenclasses seems to have become almost equivalent to writing a tutorial about monads in the Haskell world. This post contains may share on the Ruby matter. However, I opted for creating a very concise video clip. Watch in just about 13 minutes all you ever need to know about eigenclasses.
Object Hierarchy Diagrams
Click on the image to download the diagram in high resolution pdf format.
Where to go from Here
There are many resources on the matter. Paolo Perrotta's book Metaprogramming Ruby (perrotta10) would be the first that comes to my mind. Next, there is Russ Olsen's Eloquent Ruby (olsen11), and of course the Pick Axe (tfh09). Yehuda Katz published the blog-post Metaprogramming in Ruby: It’s All About the Self (katz09) seem to be well known. However, it is wrong in stating that it is all about self. Read Yuki Sonoda's remark on that (yugui09). The more recent article Ruby's Eigenclasses Demystified by Andrea Singh is well composed, and the used notation is in alignment with Perrotta's Metaprogramming Ruby.
- (katz09) article/blog-post: Metaprogramming in Ruby: It’s All About the Self, by Yehuda Katz
- (olsen11) Eloquent Ruby; 2011 by Russ Olsen
- (perrotta10) Metaprogramming Ruby; 2010 by Paolo Perrotta
- (singh11) article/blog-post: Ruby's Eigenclasses Demystified, by Andrea Singh aka "madebydna"
- (tfh09) Programming Ruby 1.9 - "The PickAxe"; Dave Thomas, Chad Fowler, and Andy Hunt
- (yugui09) article/blog-post: Three implicit contexts in Ruby, by Yuki Sonoda, aka "Yugui"