search for: string_containing_class_nam

Displaying 1 result from an estimated 1 matches for "string_containing_class_nam".

2006 Jan 19
4
create an object from a string?
I''m trying to dynamically create an instance of an object at runtime, from a String. I have a method that returns one of a number of Strings ("Car", "Motorcycle", "Bicycle"), and when I receive the String, I then want to instantiate one of those objects. Seems like there should be a way to do it in Ruby, but maybe I''ve been up too long --