Table of Contents Metaprogramming in Ruby: Part 1 Metaprogramming in Ruby: Part 2 What is Metaprogramming? Metaprogramming is code that writes code for you. But isn’t that what code generators do, like the rails gem, or yeoman? Or even bytecode compilers? Yes, but metaprogramming typically refers to something else in Ruby. Metaprogramming in ruby refers to code that writes code for you dynamically