Module: Enviro::Configuration::ClassMethods
- Defined in:
- lib/enviro/configuration.rb
Instance Method Summary collapse
- #configuration ⇒ Object
- #configuration_path ⇒ Object
- #configuration_path_env(value = nil) ⇒ Object
- #configuration_path_str(path = nil) ⇒ Object
Instance Method Details
#configuration ⇒ Object
31 32 33 |
# File 'lib/enviro/configuration.rb', line 31 def configuration @_configuration ||= _load_configuration_path end |
#configuration_path ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/enviro/configuration.rb', line 23 def configuration_path if @_configuration_path_str @_configuration_path ||= @_configuration_path_str else @_configuration_path ||= (ENV[configuration_path_env]||'enviro.yml') end end |
#configuration_path_env(value = nil) ⇒ Object
13 14 15 16 17 |
# File 'lib/enviro/configuration.rb', line 13 def configuration_path_env(value=nil) @_configuration_path_env ||= 'ENVIRO_CONF_PATH' @_configuration_path_env = value.to_s.upcase unless value.nil? @_configuration_path_env end |
#configuration_path_str(path = nil) ⇒ Object
19 20 21 |
# File 'lib/enviro/configuration.rb', line 19 def configuration_path_str(path=nil) @_configuration_path_str = path end |