by johnnygood · 15y ago · 0 comments
class Cool
[:ice, :soda, :snow].each do |item|
define_method item do
#some code
end
end
end
There isn't a real reason why that couldn't be pre-processed. I don't know a ton of Java, but the idea of compile-time code generation is appealing. Does anyone know more about this?Boo can do cool things like that though:
http://bamboo.github.com/2010/07/11/boo-meta-programming-fac...