rubocop-hq/rubocop

View on GitHub
lib/rubocop/cli/environment.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module RuboCop
  class CLI
    # Execution environment for a CLI command.
    # @api private
    class Environment
      attr_reader :options, :config_store, :paths

      def initialize(options, config_store, paths)
        @options = options
        @config_store = config_store
        @paths = paths
      end

      # Run a command in this environment.
      def run(name)
        Command.run(self, name)
      end
    end
  end
end