Class: Rubysmith::CLI::Parsers::Core
- Inherits:
-
Object
- Object
- Rubysmith::CLI::Parsers::Core
- Defined in:
- lib/rubysmith/cli/parsers/core.rb
Overview
Handles parsing of Command Line Interface (CLI) core options.
Class Method Summary collapse
Instance Method Summary collapse
- #call(arguments = ::Core::EMPTY_ARRAY) ⇒ Object
-
#initialize(configuration = Container[:configuration], client: Parser::CLIENT) ⇒ Core
constructor
A new instance of Core.
Constructor Details
#initialize(configuration = Container[:configuration], client: Parser::CLIENT) ⇒ Core
Returns a new instance of Core.
17 18 19 20 21 |
# File 'lib/rubysmith/cli/parsers/core.rb', line 17 def initialize(configuration = Container[:configuration], client: Parser::CLIENT, **) super(**) @configuration = configuration @client = client end |
Class Method Details
.call ⇒ Object
15 |
# File 'lib/rubysmith/cli/parsers/core.rb', line 15 def self.call(...) = new(...).call |
Instance Method Details
#call(arguments = ::Core::EMPTY_ARRAY) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/rubysmith/cli/parsers/core.rb', line 23 def call arguments = ::Core::EMPTY_ARRAY client. = specification.labeled_summary client.separator "\nUSAGE:\n" collate client.parse arguments configuration end |