Class: SexySettings::Configuration
- Inherits:
-
Object
- Object
- SexySettings::Configuration
- Defined in:
- lib/sexy_settings/configuration.rb
Overview
This class holds all configuration settings
Constant Summary collapse
- DEFAULT_OPTIONS =
{ path_to_default_settings: 'default.yml', path_to_custom_settings: 'custom.yml', path_to_project: '.', env_variable_with_options: 'SEXY_SETTINGS', cmd_line_option_delimiter: ',' }.freeze
Instance Method Summary collapse
- #cmd_line_option_delimiter ⇒ Object
- #env_variable_with_options ⇒ Object
- #path_to_custom_settings ⇒ Object
- #path_to_default_settings ⇒ Object
- #path_to_project ⇒ Object
Instance Method Details
#cmd_line_option_delimiter ⇒ Object
14 15 16 17 18 |
# File 'lib/sexy_settings/configuration.rb', line 14 def cmd_line_option_delimiter ENV['SEXY_SETTINGS_DELIMITER'] || @cmd_line_option_delimiter || DEFAULT_OPTIONS[:cmd_line_option_delimiter] end |
#env_variable_with_options ⇒ Object
32 33 34 |
# File 'lib/sexy_settings/configuration.rb', line 32 def @env_variable_with_options || DEFAULT_OPTIONS[:env_variable_with_options] end |
#path_to_custom_settings ⇒ Object
24 25 26 |
# File 'lib/sexy_settings/configuration.rb', line 24 def path_to_custom_settings @path_to_custom_settings || DEFAULT_OPTIONS[:path_to_custom_settings] end |
#path_to_default_settings ⇒ Object
20 21 22 |
# File 'lib/sexy_settings/configuration.rb', line 20 def path_to_default_settings @path_to_default_settings || DEFAULT_OPTIONS[:path_to_default_settings] end |
#path_to_project ⇒ Object
28 29 30 |
# File 'lib/sexy_settings/configuration.rb', line 28 def path_to_project @path_to_project || DEFAULT_OPTIONS[:path_to_project] end |