Sha256: 0e7294cbb81abde4bf217660de060e56a50002de8cd5ae08747a27a7c1b4eb9b
Contents?: true
Size: 774 Bytes
Versions: 4
Compression:
Stored size: 774 Bytes
Contents
# frozen_string_literal: true require "rubycritic/cli/options" require "rubycritic/cli/application" require "skunk" require "skunk/rubycritic/analysed_module" require "skunk/cli/options" require "skunk/cli/command_factory" module Skunk module Cli # Knows how to execute command line commands class Application < RubyCritic::Cli::Application def initialize(argv) @options = Skunk::Cli::Options.new(argv) end def execute parsed_options = @options.parse.to_h reporter = Skunk::Cli::CommandFactory.create(parsed_options).execute print(reporter.status_message) reporter.status rescue OptionParser::InvalidOption => error warn "Error: #{error}" STATUS_ERROR end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
skunk-0.4.2 | lib/skunk/cli/application.rb |
skunk-0.4.1 | lib/skunk/cli/application.rb |
skunk-0.4.0 | lib/skunk/cli/application.rb |
skunk-0.3.2 | lib/skunk/cli/application.rb |