Possible Duplicate:
How to convert a string to a constant in Ruby?
I am wondering whether there is a way for me to convert a string to a class in ruby. What i mean by this is that, given a String like
'Fixnum'
i want a way to get the class
Fixnum
back
can someone give me an idea on how to do this?
"FixNum".classify.contantize should do it
精彩评论