From: Thufir Date: 2007-11-08T12:34:56+09:00 Subject: Re: instantiating random sub-classes (Dragon, TeethDeer, etc On Nov 7, 7:03 pm, 7stud -- wrote: [...] > You can save those sub Classes in an array: > > class Creature > def Creature.inherited(new_subClass_that_was_defined) > puts new_subClass_that_was_defined > > if not defined?(@@subs) > @@subs = [] > end > > @@subs << new_subClass_that_was_defined > > end > > def Creature.subs #can access @@subs using: Creature.subs > @@subs > end > end [...] Ah, thank you for fleshing it out, but is it ok that @@subs isn't declared? I seem to have created multiple threads on this topic, oops. Thank you everyone for the input, many good ideas and an almost overwhelming amount of information to absorb :) -Thufir