Class: Yarrow::Configuration
- Inherits:
-
Object
- Object
- Yarrow::Configuration
- Defined in:
- lib/yarrow/configuration.rb
Class Method Summary collapse
-
.load(file) ⇒ Yarrow::Config
Loads a configuration object from the given YAML file.
-
.load_defaults ⇒ Yarrow::Configuration
Yarrow is distributed with a ‘defaults.yml` which provides minimum boostrap configuration and default settings for various internal classes.
Class Method Details
.load(file) ⇒ Yarrow::Config
Loads a configuration object from the given YAML file.
9 10 11 |
# File 'lib/yarrow/configuration.rb', line 9 def load(file) coerce_config_struct(YAML.load(File.read(file), symbolize_names: true)) end |
.load_defaults ⇒ Yarrow::Configuration
Yarrow is distributed with a ‘defaults.yml` which provides minimum boostrap configuration and default settings for various internal classes. Use this method to automatically load these defaults.
18 19 20 |
# File 'lib/yarrow/configuration.rb', line 18 def load_defaults load(File.join(File.dirname(__FILE__), 'defaults.yml')) end |