Module: RareMap::ConfigLoader

Included in:
Mapper
Defined in:
lib/rare_map/config_loader.rb

Constant Summary collapse

OPTS_KEY =
'rare_map_opts'

Instance Method Summary collapse

Instance Method Details

#load_config(path, file_name = 'rare_map.yml') ⇒ Object



8
9
10
11
12
# File 'lib/rare_map/config_loader.rb', line 8

def load_config(path, file_name = 'rare_map.yml')
  raise ConfigNotFoundError unless File.exist? "#{path}#{file_name}"
  config = YAML.load_file "#{path}#{file_name}"
  organize_config_properties config['rare_map'] || config || {}
end