Module: RareMap::ConfigLoader
Overview
RareMap::ConfigLoader translates a rare_map.yml into DatabaseProfile.
Constant Summary collapse
- OPTS_KEY =
The key of rare map options inside a config YAML.
'rare_map_opts'
Instance Method Summary collapse
-
#load_config(path = '.', file_name = 'rare_map.yml') ⇒ Array
Translates a rare_map.yaml into an Array of DatabaseProfile.
Instance Method Details
#load_config(path = '.', file_name = 'rare_map.yml') ⇒ Array
Translates a rare_map.yaml into an Array of DatabaseProfile.
19 20 21 22 23 |
# File 'lib/rare_map/config_loader.rb', line 19 def load_config(path = '.', file_name = 'rare_map.yml') raise ConfigNotFoundError unless File.exist? File.join(path, file_name) config = YAML.load_file File.join(path, file_name) organize_config_properties config['rare_map'] || config || {} end |