Method: Rdm::ConfigManager#load_config

Defined in:
lib/rdm/config_manager.rb

#load_config(config, source:) ⇒ Object

Update configuration based on given config file

Parameters:

Returns:

  • root scope [Rdm::ConfigScope] Updated root scope



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/rdm/config_manager.rb', line 8

def load_config(config, source:)
  if config.default_path
    full_default_path = File.join(source.root_path, config.default_path)
    update_using_file(full_default_path, raise_if_missing: true)
  end
  if config.role_path
    full_role_path = File.join(source.root_path, config.role_path)
    update_using_file(full_role_path, raise_if_missing: false)
  end
  root_scope
end