Ola Bini looks at Ruby Metaprogramming Techniques
Ola Bini, a Ruby developer from Stockholm, Sweden, has put together an excellent article about Ruby Metaprogramming Techniques. He looks at singleton classes, writing DSLs, dynamic class and module generation, fun with method_missing, method-pattern dispatchers, method replacement, null object refactoring, instance variable introspection, Procs and blocks, and bindings. It's heavy stuff but presented in a surprisingly light and interesting way.