Eric I. wrote: > Hi Greg, > > Well the methods you can call *as* a class is being defined are > *class* methods. initialize_colors is an instance method, as it > should be since it's setting instance variables. > > It seems to me that you want to call initialize_colors not as the > class is being defined but as instances are being created. And > therefore the call to initialize_colors should be inside Square's > initialize method. The exercise is to figure how to make initialize_colors work as a class method -- so if the instance vars are misleading, then it's those I would change. I am just experiementing to understand with working examples how various syntax and behavior are related in Ruby to acheive various levels of functionality at the class, instance, and module realms. Another way to look at this is that I'm trying to understand how some things in Rails work by replicating them on a micro scale -- in this case a good example might be how the validates_ methods all work. They're called as class methods from within a subclass and I would expect they're implemented via modules. I've traced the source, but there's too much noise for me at this stage of my Ruby experience. -- gw -- Posted via http://www.ruby-forum.com/.