27
In Ruby there are several gimmicks that might be more appropriate than eval():
#send which allows you to call a method whose name you have as string and pass parameters to it.yield allows you to pass a block of code to a method which will be executed in the context of the receiving method.Kernel.const_get("String") is sufficient to get the class whose name you have as string.I think I am not able to explain them properly in detail, so I just gave you the hints, if you're interested you'll google.