Class: RuboCop::Cop::Style::ParallelAssignment::GenericCorrector
- Inherits:
-
Object
- Object
- RuboCop::Cop::Style::ParallelAssignment::GenericCorrector
- Includes:
- AutocorrectAlignment
- Defined in:
- lib/rubocop/cop/style/parallel_assignment.rb
Overview
An internal class for correcting parallel assignment
Direct Known Subclasses
Constant Summary
Constants included from AutocorrectAlignment
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#correction ⇒ Object
readonly
Returns the value of attribute correction.
-
#correction_range ⇒ Object
readonly
Returns the value of attribute correction_range.
-
#node ⇒ Object
readonly
Returns the value of attribute node.
Instance Method Summary collapse
-
#initialize(node, config, new_elements) ⇒ GenericCorrector
constructor
A new instance of GenericCorrector.
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
#config ⇒ Object (readonly)
Returns the value of attribute config.
145 146 147 |
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 145 def config @config end |
#correction ⇒ Object (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_range ⇒ Object (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 |
#node ⇒ Object (readonly)
Returns the value of attribute node.
145 146 147 |
# File 'lib/rubocop/cop/style/parallel_assignment.rb', line 145 def node @node end |