Class: Rodot::Configuration

Inherits:
Hash
  • Object
show all
Defined in:
lib/rodot/configuration.rb

Constant Summary collapse

BASE_DIR_PATH =
File.expand_path('../..', File.dirname(__FILE__))
DEFAULT_CONF_DIR_PATH =
File.expand_path('config', BASE_DIR_PATH)
DEFAULT_CONF_FILE_PATH =
File.expand_path('conf.yml', DEFAULT_CONF_DIR_PATH)
DEFAULT_APP_CONF_DIR_PATH =
File.expand_path('applications', DEFAULT_CONF_DIR_PATH)

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

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_defaultObject



14
15
16
# File 'lib/rodot/configuration.rb', line 14

def load_default
  @default_configuration ||= YAML.load_file(DEFAULT_CONF_FILE_PATH)
end