Class: CleoQualityReview::Configuration::Loader
- Inherits:
-
Object
- Object
- CleoQualityReview::Configuration::Loader
- Defined in:
- lib/cleo_quality_review/configuration.rb
Overview
Loads and merges configuration files with inheritance support
Instance Method Summary collapse
-
#initialize(root:) ⇒ Loader
constructor
A new instance of Loader.
-
#load ⇒ Configuration
Load merged configuration.
Constructor Details
Instance Method Details
#load ⇒ Configuration
Load merged configuration
93 94 95 96 97 98 99 |
# File 'lib/cleo_quality_review/configuration.rb', line 93 def load data = load_file(DEFAULT_CONFIG_PATH) local_config_path = File.join(root, LOCAL_CONFIG_PATH) data = merge(data, load_file(local_config_path)) if File.file?(local_config_path) Configuration.new(data) end |