Sha256: a8e1bf100d840aa33fe718960b8d3611708a74e6e39d4a9e0401c8f911806129

Contents?: true

Size: 654 Bytes

Versions: 2

Compression:

Stored size: 654 Bytes

Contents

# frozen_string_literal: true

require "skunk"
require "skunk/rubycritic/analysed_module"
require "skunk/cli/options"
require "skunk/cli/command_factory"

require "rubycritic/cli/application"

module Skunk
  module Cli
    # Knows how to execute command line commands
    class Application < RubyCritic::Cli::Application
      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

2 entries across 2 versions & 1 rubygems

Version Path
skunk-0.3.1 lib/skunk/cli/application.rb
skunk-0.3.0 lib/skunk/cli/application.rb