Class: LucaSupport::ConstantHolder
- Inherits:
-
Object
- Object
- LucaSupport::ConstantHolder
- Includes:
- Singleton
- Defined in:
- lib/luca_support/const.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#configdir ⇒ Object
readonly
Returns the value of attribute configdir.
-
#pjdir ⇒ Object
readonly
Returns the value of attribute pjdir.
Instance Method Summary collapse
-
#initialize ⇒ ConstantHolder
constructor
A new instance of ConstantHolder.
- #set_config(config) ⇒ Object
- #set_configdir(path) ⇒ Object
- #set_pjdir(path) ⇒ Object
Constructor Details
#initialize ⇒ ConstantHolder
Returns a new instance of ConstantHolder.
10 11 12 13 14 15 16 17 18 |
# File 'lib/luca_support/const.rb', line 10 def initialize @pjdir = ENV['LUCA_TEST_DIR'] @configdir = ENV['LUCA_TEST_DIR'] @config = { 'decimal_separator' => '.', 'decimal_num' => 2, 'thousands_separator' => ',' } end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
8 9 10 |
# File 'lib/luca_support/const.rb', line 8 def config @config end |
#configdir ⇒ Object (readonly)
Returns the value of attribute configdir.
8 9 10 |
# File 'lib/luca_support/const.rb', line 8 def configdir @configdir end |
#pjdir ⇒ Object (readonly)
Returns the value of attribute pjdir.
8 9 10 |
# File 'lib/luca_support/const.rb', line 8 def pjdir @pjdir end |
Instance Method Details
#set_config(config) ⇒ Object
29 30 31 |
# File 'lib/luca_support/const.rb', line 29 def set_config(config) @config = config end |
#set_configdir(path) ⇒ Object
25 26 27 |
# File 'lib/luca_support/const.rb', line 25 def set_configdir(path) @configdir = path end |
#set_pjdir(path) ⇒ Object
20 21 22 23 |
# File 'lib/luca_support/const.rb', line 20 def set_pjdir(path) @pjdir ||= path @configdir ||= path end |