Class: Fixversion::CLI::Shell
- Inherits:
-
Object
- Object
- Fixversion::CLI::Shell
- Defined in:
- lib/fixversion/cli/shell.rb
Overview
The main Command Line Interface (CLI) object.
Instance Method Summary collapse
- #call(arguments = []) ⇒ 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.
9 10 11 12 |
# File 'lib/fixversion/cli/shell.rb', line 9 def initialize parser: Parser.new, **dependencies super(**dependencies) @parser = parser end |
Instance Method Details
#call(arguments = []) ⇒ Object
14 15 16 17 18 |
# File 'lib/fixversion/cli/shell.rb', line 14 def call arguments = [] perform parser.call(arguments) rescue OptionParser::ParseError => error logger.error { error. } end |