Class: RuboCop::CLI::Environment Private

Inherits:
Object
  • Object
show all
Defined in:
lib/rubocop/cli/environment.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Execution environment for a CLI command.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options, config_store, paths) ⇒ Environment

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Environment.



10
11
12
13
14
# File 'lib/rubocop/cli/environment.rb', line 10

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

Instance Attribute Details

#config_storeObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/rubocop/cli/environment.rb', line 8

def config_store
  @config_store
end

#optionsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/rubocop/cli/environment.rb', line 8

def options
  @options
end

#pathsObject (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
# File 'lib/rubocop/cli/environment.rb', line 8

def paths
  @paths
end

Instance Method Details

#run(name) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Run a command in this environment.



17
18
19
# File 'lib/rubocop/cli/environment.rb', line 17

def run(name)
  Command.run(self, name)
end