For a good understanding of how the Ruby object model and metaprogramming work, I highly recommend these ScreenCasts to pragmatic programmer Dave Thomas:
http://pragprog.com/screencasts/v-dtrubyom/the-ruby-object-model-and-metaprogramming
Dave Thomas is shocked by the explanation of the concepts, and the screencasts have good graphics in which they visualize how everything communicates with each other .. these ScreenCasts are straightforward, without distractions - and are worth every penny, err cent!
There is also a book “Ruby Metaprogramming” http://pragprog.com/book/ppmetr/metaprogramming-ruby but, although it covers many concepts, the book is poorly written, and this makes writing style very difficult to remember concepts / or use the book as a reference to search for things later.
Tilo
source share