Class: LucaSupport::ConstantHolder

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/luca_support/const.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConstantHolder

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

#configObject (readonly)

Returns the value of attribute config.



8
9
10
# File 'lib/luca_support/const.rb', line 8

def config
  @config
end

#configdirObject (readonly)

Returns the value of attribute configdir.



8
9
10
# File 'lib/luca_support/const.rb', line 8

def configdir
  @configdir
end

#pjdirObject (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