Add ref.; metaprogramming in Ruby