Class: Rodot::Configuration
- Inherits:
-
Hash
- Object
- Hash
- Rodot::Configuration
- Defined in:
- lib/rodot/configuration.rb
Constant Summary collapse
- BASE_DIR_PATH =
File.('../..', File.dirname(__FILE__))
- DEFAULT_CONF_DIR_PATH =
File.('config', BASE_DIR_PATH)
- DEFAULT_CONF_FILE_PATH =
File.('conf.yml', DEFAULT_CONF_DIR_PATH)
- DEFAULT_APP_CONF_DIR_PATH =
File.('applications', DEFAULT_CONF_DIR_PATH)
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rodot/configuration.rb', line 19 def initialize # conf_file_path = File.expand_path(default_configuration["conf_file_name"], default_configuration["conf_dir_path"]) # user_configuration = YAML.load_file(conf_file_path) # Utils.deep_merge_hashes(default_configuration, user_configuration) super default_configuration = Configuration.load_default merge!(default_configuration) end |
Class Method Details
.load_default ⇒ Object
14 15 16 |
# File 'lib/rodot/configuration.rb', line 14 def load_default @default_configuration ||= YAML.load_file(DEFAULT_CONF_FILE_PATH) end |