Sha256: 050c7d86f10f6fd92a6435f02a42ac285522b4795011de645d4eacccdc57bfc1
Contents?: true
Size: 827 Bytes
Versions: 2
Compression:
Stored size: 827 Bytes
Contents
require "core" <% namespace do %> module CLI # The main Command Line Interface (CLI) object. class Shell include Actions::Import[:config, :specification, :logger] def initialize parser: Parser.new, **dependencies super(**dependencies) @parser = parser end def call arguments = Core::EMPTY_ARRAY perform parser.call(arguments) rescue OptionParser::ParseError => error logger.error { error.message } end private attr_reader :parser def perform configuration case configuration in action_config: Symbol => action then config.call action in action_version: true then logger.info { specification.labeled_version } else logger.any { parser.to_s } end end end end <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
gemsmith-19.3.0 | lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/shell.rb.erb |
gemsmith-19.2.0 | lib/gemsmith/templates/%project_name%/lib/%project_path%/cli/shell.rb.erb |