From: Peter Szinek Date: 2007-11-20T19:51:23+09:00 Subject: Re: Dynamically call classes Tizian Taz wrote: > Ok, but now, how can I access for example the method Hello which this > existing class inheritated from his mother-class? > > I ask this because "Status.Hello" doesn't work... > > Maybe I wasn't clear enough in my description : > > The classes that I want to call all exist but I don't want to make a > huge amount of tests to know which I have to call. Tell me if I'm not > clear :S > class Animal def ooze puts "oooooo" end def Animal.winkle puts "winkle" end end class Dog < Animal end Kernel.const_get("Dog").new.ooze Kernel.const_get("Dog").winkle HTH, Peter ___ http://www.rubyrailways.com http://scrubyt.org