inguansoft
Journey on entrepreneurship by doing Software that changes the world
Monday, February 21, 2011
dynamic access to constants on ruby
How to verify if the constant is available?
self.const_defined?('DEFAULT_VALUES')
How to call for it: simple way: MyClass::CONSTANT
Dynamic cool way: MyClass.const_get("CONSTANT")
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)