From: Christian Neukirchen Date: 2005-10-05T05:37:21+09:00 Subject: Re: creating objects Adam Shelly writes: > On 10/3/05, Hal Fulton wrote: >> Felix McCoey wrote: >> > i know that in PHP it is possible to do the following: >> > >> > $class_name = 'User'; >> > $$class_name->new() >> > >> > but I want to do this in ruby like this perhaps: >> > >> > @class_name = 'User' >> > @class_name.new >> > > > @class_name = User > @class_name.new > > -or- > > @class_name = "User" eval(@class_name).new -- Christian Neukirchen http://chneukirchen.org