M
Marli Ba
I've been looking for a method similar to:
Obj.sendmethod)
but to access class constants. So if I have:
class MyObj
MY_CONSTANT_1
end
I want to access MyObj::MY_CONSTANT_1 by using a variable like foo =
MY_CONSTANT_1 and then MyObj::sendfoo), but obviously send is only
meant to work with methods and not constants.
Is there any way to do this? I've looked but am having difficulty
finding anything.
Thanks,
Marli
Obj.sendmethod)
but to access class constants. So if I have:
class MyObj
MY_CONSTANT_1
end
I want to access MyObj::MY_CONSTANT_1 by using a variable like foo =
MY_CONSTANT_1 and then MyObj::sendfoo), but obviously send is only
meant to work with methods and not constants.
Is there any way to do this? I've looked but am having difficulty
finding anything.
Thanks,
Marli