Ruby metaprogramming techniques
approval
A collection of metaprogramming techniques in ruby:\r\n 1. Use the singleton-class\r\n 2. Write DSL's using class-methods that rewrite subclasses\r\n 3. Create classes and modules dynamically\r\n 4. Use method_missing to do interesting things\r\n 5. Dispatch on method-patterns\r\n 6. Replacing methods\r\n 7. Use NilClass to implement the Introduce Null Object refactoring\r\n 8. Learn the different versions of eval\r\n 9. Introspect on instance variables\r\n 10. Create Procs from blocks and send them around\r\n 11. Use binding to control your evaluations