I’m trying to dynamically create an instance of an object at runtime,
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
too long – can’t find it. In Java, I’d be doing something like this:
Any help greatly appreciated.