class FLACsmith::CLI::Parser

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

Constants

CLIENT
SECTIONS

Public Class Methods

new(sections: SECTIONS, client: CLIENT, **dependencies) click to toggle source
Calls superclass method
# File lib/flacsmith/cli/parser.rb, line 14
def initialize sections: SECTIONS, client: CLIENT, **dependencies
  super(**dependencies)

  @sections = sections
  @client = client
  @configuration_duplicate = configuration.dup
end

Public Instance Methods

call(arguments = []) click to toggle source
# File lib/flacsmith/cli/parser.rb, line 22
def call arguments = []
  sections.each { |section| section.call configuration_duplicate, client: }
  client.parse arguments
  configuration_duplicate.freeze
end
to_s(= client.to_s) click to toggle source
# File lib/flacsmith/cli/parser.rb, line 28
  def to_s = client.to_s

  private

  attr_reader :sections, :client, :configuration_duplicate
end