From: "jacob.dunphy@..." Date: 2007-11-22T08:02:25+09:00 Subject: Re: Dynamically call classes And with this, you can do the var = Kernel.const_get("ClassName") and you have a reference to that class for the scope of your operation. On Nov 20, 5:37 am, "Rick DeNatale" wrote: > On Nov 20, 2007 5:21 AM, 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 > > You can do this, and others are already helping. but... > > Do you really have a firm requirement to use a string to represent the class. > > Why not just: > > var = Status > > ... > > var.Hello > > Classes in Ruby are objects and variables can be used to refer to them. > > -- > Rick DeNatale > > My blog on Rubyhttp://talklikeaduck.denhaven2.com/