Class: Rubysmith::CLI::Configuration::Loader

Inherits:
Object
  • Object
show all
Defined in:
lib/rubysmith/cli/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 "#{Identity::NAME}/configuration.yml", defaults: DEFAULTS

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content: Content.new, client: CLIENT) ⇒ Loader

Returns a new instance of Loader.



22
23
24
25
# File 'lib/rubysmith/cli/configuration/loader.rb', line 22

def initialize content: Content.new, client: CLIENT
  @content = content
  @client = client
end

Class Method Details

.callObject



20
# File 'lib/rubysmith/cli/configuration/loader.rb', line 20

def self.call = new.call

Instance Method Details

#callObject



27
# File 'lib/rubysmith/cli/configuration/loader.rb', line 27

def call = content.merge(**client.to_h.flatten_keys)