Class: Anyway::Loaders::YAML
Direct Known Subclasses
Instance Method Summary collapse
Methods inherited from Base
call, #initialize, #use_local?
Constructor Details
This class inherits a constructor from Anyway::Loaders::Base
Instance Method Details
#call(config_path:, **_options) ⇒ Object
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/anyway/loaders/yaml.rb', line 12 def call(config_path:, **) base_config = trace!(:yml, path: relative_config_path(config_path).to_s) { load_base_yml(config_path) } return base_config unless use_local? local_path = local_config_path(config_path) local_config = trace!(:yml, path: relative_config_path(local_path).to_s) { load_local_yml(local_path) } Utils.deep_merge!(base_config, local_config) end |