It also shows how you can iterate from the ugliest, most powerful, most dangerous eval method by pulling out the functionality you need into less-powerful, safer manipulations. It's all Ruby code until it's actually executed, so it can all be manipulated at runtime.
Also, you might enjoy a silly gem I wrote a while ago called ghost_attributes . It uses closures to mimic attr_accessor. The funny thing about it is that your ghost attributes are completely inaccessible from outside the object, unlike normal instance variables, which are always reachable via things like instance_variable_get. Fun/weird stuff :)
If you've got the basics of Ruby down, get this book and take it to the next level
As for the gems in rails..study their code, learn what they try to do, then program it yourself, else you might spend forever fighting with poorly documented and fragile gems, that were never really intended for long term production use anyway..
just my 2 cents..
Fresh book recommendations delivered straight to your inbox every Thursday.