F
Felix McCoey
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
What is this called and is it possible in ruby. Or is there an
alternative to creating objects from just the class name?
-felix
$class_name = 'User';
$$class_name->new()
but I want to do this in ruby like this perhaps:
@class_name = 'User'
@class_name.new
What is this called and is it possible in ruby. Or is there an
alternative to creating objects from just the class name?
-felix