metaprogramming in ruby