Class: RuboCop::Cop::Style::ParallelAssignment::GenericCorrector

Inherits:
Object
  • Object
show all
Includes:
AutocorrectAlignment
Defined in:
lib/rubocop/cop/style/parallel_assignment.rb

Overview

An internal class for correcting parallel assignment

Direct Known Subclasses

ModifierCorrector, RescueCorrector

Constant Summary

Constants included from AutocorrectAlignment

AutocorrectAlignment::SPACE

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from AutocorrectAlignment

#autocorrect, #check_alignment, #configured_indentation_width, #display_column, #indentation, #offset

Constructor Details

#initialize(node, config, new_elements) ⇒ GenericCorrector

Returns a new instance of GenericCorrector.



165
166
167
168
169
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 165

def initialize(node, config, new_elements)
  @node = node
  @config = config
  @new_elements = new_elements
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



163
164
165
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 163

def config
  @config
end

#correctionObject (readonly)

Returns the value of attribute correction.



163
164
165
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 163

def correction
  @correction
end

#correction_rangeObject (readonly)

Returns the value of attribute correction_range.



163
164
165
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 163

def correction_range
  @correction_range
end

#nodeObject (readonly)

Returns the value of attribute node.



163
164
165
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 163

def node
  @node
end