A gist of metaprogramming from the book Metaprogramming in Ruby