Displaying 1 result from an estimated 1 matches for "list_constant".
Did you mean:
is_constant
2007 Oct 04
0
Module + Constant Issue
...onstants
IMPORTANT_VALUE = "x" unless defined?(AppConstants::IMPORTANT_VALUE)
end
3) Create a Ruby module in the file lib/app_constants/list.rb, noting
the "top level" name of the module matches the one specified in the
environment file:
module AppConstants
module List
LIST_CONSTANT = "list_constant"
end
end
3) Fire up the console and probe the constant values:
Loading development environment.
>> AppConstants::List::LIST_CONSTANT
=> "list_constant"
>> AppConstants::IMPORTANT_VALUE
=> "x"
4) Quit from the console and add deve...