lib/milestoner/cli/shell.rb in milestoner-15.2.0 vs lib/milestoner/cli/shell.rb in milestoner-15.2.1
- old
+ new
@@ -6,25 +6,25 @@
module CLI
# The main Command Line Interface (CLI) object.
class Shell
include Actions::Import[:config, :publish, :status, :specification, :logger]
- def initialize parser: Parser.new, **dependencies
- super(**dependencies)
+ def initialize(parser: Parser.new, **)
+ super(**)
@parser = parser
end
def call arguments = Core::EMPTY_ARRAY
- perform parser.call(arguments)
+ act_on parser.call(arguments)
rescue OptionParser::ParseError, Error => error
logger.error { error.message }
end
private
attr_reader :parser
- def perform configuration
+ def act_on configuration
case configuration
in action_config: Symbol => action then config.call action
in action_publish: true then publish.call configuration
in action_status: true then status.call
in action_version: true then logger.info { specification.labeled_version }