Class: Oldfixversion::Configuration::Loader
- Inherits:
-
Object
- Object
- Oldfixversion::Configuration::Loader
- Defined in:
- lib/oldfixversion/configuration/loader.rb
Overview
Represents the fully assembled Command Line Interface (CLI) configuration.
Constant Summary collapse
- DEFAULTS =
(YAML.load_file(Pathname(__dir__).join("defaults.yml")) || {}).freeze
- CLIENT =
Runcom::Config.new "oldfixversion/configuration.yml", defaults: DEFAULTS
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(content: Content.new, client: CLIENT) ⇒ Loader
constructor
A new instance of Loader.
Constructor Details
Class Method Details
.call ⇒ Object
19 |
# File 'lib/oldfixversion/configuration/loader.rb', line 19 def self.call = new.call |
.with_defaults ⇒ Object
21 |
# File 'lib/oldfixversion/configuration/loader.rb', line 21 def self.with_defaults = new client: DEFAULTS |
Instance Method Details
#call ⇒ Object
28 |
# File 'lib/oldfixversion/configuration/loader.rb', line 28 def call = content.merge(**client.to_h.flatten_keys).freeze |