Class: Pennyworth::CLI::Parsers::Assembler
- Inherits:
-
Object
- Object
- Pennyworth::CLI::Parsers::Assembler
- Defined in:
- lib/pennyworth/cli/parsers/assembler.rb
Overview
Assembles and parses all Command Line Interface (CLI) options.
Instance Method Summary collapse
- #call(arguments = []) ⇒ Object
-
#initialize(configuration = CLI::Configuration::Loader.call, sections: SECTIONS, client: CLIENT) ⇒ Assembler
constructor
A new instance of Assembler.
- #to_s ⇒ Object
Constructor Details
#initialize(configuration = CLI::Configuration::Loader.call, sections: SECTIONS, client: CLIENT) ⇒ Assembler
Returns a new instance of Assembler.
10 11 12 13 14 15 16 |
# File 'lib/pennyworth/cli/parsers/assembler.rb', line 10 def initialize configuration = CLI::Configuration::Loader.call, sections: SECTIONS, client: CLIENT @configuration = configuration @sections = sections @client = client end |
Instance Method Details
#call(arguments = []) ⇒ Object
18 19 20 21 22 |
# File 'lib/pennyworth/cli/parsers/assembler.rb', line 18 def call arguments = [] sections.each { |parser| parser.call configuration, client: client } client.parse! arguments configuration end |
#to_s ⇒ Object
24 |
# File 'lib/pennyworth/cli/parsers/assembler.rb', line 24 def to_s = client.to_s |