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, #indentation, #offset, #start_of_line?

Constructor Details

#initialize(node, config, new_elements) ⇒ GenericCorrector

Returns a new instance of GenericCorrector.



147
148
149
150
151
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 147

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.



145
146
147
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 145

def config
  @config
end

#correctionObject (readonly)

Returns the value of attribute correction.



145
146
147
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 145

def correction
  @correction
end

#correction_rangeObject (readonly)

Returns the value of attribute correction_range.



145
146
147
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 145

def correction_range
  @correction_range
end

#nodeObject (readonly)

Returns the value of attribute node.



145
146
147
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 145

def node
  @node
end