From: Phil Stone Date: 2012-04-11T12:46:20+09:00 Subject: Re: A Beginner's Question about Metaprogramming Thanks, that's quite some information to take in. Am I correct that the code below can't be rewritten, since it doesn't deal with Singletons? (taking a risky assumption here) class_eval do define_method( :initialize ) do self.class.traits.each do |k,v| instance_variable_set("@#{k}", v) end end end After all, it only deals with the instances. Also, I've been really confused about the difference between classes and objects. I know that Objects are classes themselves, through "Object.class", which returns "Class". If "hello" is an instance and String is a class, what is an example of an Object? Thanks for your continued help. -- Posted via http://www.ruby-forum.com/.