class Tocer::CLI::Parsers::Assembler

Assembles and parses all Command Line Interface (CLI) options.

Constants

SECTIONS

Public Class Methods

new(configuration: CLI::Configuration::Loader.call, sections: SECTIONS, client: CLIENT) click to toggle source
# File lib/tocer/cli/parsers/assembler.rb, line 10
def initialize configuration: CLI::Configuration::Loader.call,
               sections: SECTIONS,
               client: CLIENT
  @options = configuration.to_h
  @sections = sections
  @client = client
end

Public Instance Methods

call(arguments = []) click to toggle source
# File lib/tocer/cli/parsers/assembler.rb, line 18
def call arguments = []
  sections.each { |parser| parser.call client: client, options: options }
  client.parse! arguments
  options
end
to_h(= options) click to toggle source
# File lib/tocer/cli/parsers/assembler.rb, line 24
    def to_h = options

    def to_s = client.to_s

    private

    attr_reader :options, :sections, :client
  end
end
to_s(= client.to_s) click to toggle source
# File lib/tocer/cli/parsers/assembler.rb, line 26
  def to_s = client.to_s

  private

  attr_reader :options, :sections, :client
end