Method: Forward::Config#load
- Defined in:
- lib/forward/config.rb
#load ⇒ Object
It initializes a new Config instance, updates it with the config values from the config file, and raises an error if there’s not a config or if the config options aren’t valid.
Returns the Config object.
130 131 132 133 134 135 |
# File 'lib/forward/config.rb', line 130 def load Forward.logger.debug('[config] loading') raise ConfigError, "Unable to find a forward config file at `#{config_path}'" unless present? update(YAML.load_file(config_path).symbolize_keys) end |