How can this line in Java be translated to Ruby:
String className = "java.util.Vector";
...
Object o = Class.forName(className).newInstance();
Thanks!
How can this line in Java be translated to Ruby:
String className = "java.util.Vector";
...
Object o = Class.forName(className).newInstance();
Thanks!
If you need to do this in a Rails project, there is also a helper that does this:
"String".constantize.new