H
Harnish Botadra
Hi,
I am having some difficulty in the use of constants in Ruby. I've a
module:
eg.
-------------------
Module Constants
MY_CONST = "hello"
end
-------------------
I include this module in my model. Further, the name of the constant
(MY_CONST) would be passed in a variable say 'var'. My question, is how
do I access the value of the constant from the constant name in 'var'?
Something like, :: + "{#var}" or similar? Any help greatly appreciated.
Thanks.
Regards,
Harnish
I am having some difficulty in the use of constants in Ruby. I've a
module:
eg.
-------------------
Module Constants
MY_CONST = "hello"
end
-------------------
I include this module in my model. Further, the name of the constant
(MY_CONST) would be passed in a variable say 'var'. My question, is how
do I access the value of the constant from the constant name in 'var'?
Something like, :: + "{#var}" or similar? Any help greatly appreciated.
Thanks.
Regards,
Harnish