Class: Hanamismith::CLI::Shell
- Inherits:
-
Object
- Object
- Hanamismith::CLI::Shell
- Defined in:
- lib/hanamismith/cli/shell.rb
Overview
The main Command Line Interface (CLI) object.
Instance Method Summary collapse
- #call(arguments = Core::EMPTY_ARRAY) ⇒ Object
-
#initialize(parser: Parser.new, **dependencies) ⇒ Shell
constructor
A new instance of Shell.
Constructor Details
#initialize(parser: Parser.new, **dependencies) ⇒ Shell
Returns a new instance of Shell.
11 12 13 14 |
# File 'lib/hanamismith/cli/shell.rb', line 11 def initialize parser: Parser.new, **dependencies super(**dependencies) @parser = parser end |
Instance Method Details
#call(arguments = Core::EMPTY_ARRAY) ⇒ Object
16 17 18 19 20 |
# File 'lib/hanamismith/cli/shell.rb', line 16 def call arguments = Core::EMPTY_ARRAY perform parser.call(arguments) rescue OptionParser::ParseError => error logger.error { error. } end |