My solution to https://groups.google.com/forum/?fromgroups=#!searchin/pdxruby/Metaprogramming$20Challenge/pdxruby/CJUoR4X5w_w/Ppih4KMLy-MJ