const_get but for variables
- by aharon
So I know you can say Kernel.const_get("ClassName") and you'll get back the class to which the string corresponds in name. But what about for variables? Is there a way to do:
test = "heyas"
some_method_here("test") #=> "heyas"
Thanks so much