class RuboCop::Cop::Style::ParallelAssignment::ModifierCorrector
An internal class for correcting parallel assignment guarded by if, unless, while, or until
Public Instance Methods
correction()
click to toggle source
# File lib/rubocop/cop/style/parallel_assignment.rb, line 220 def correction parent = node.parent modifier_range = Parser::Source::Range.new(parent.source_range.source_buffer, parent.loc.keyword.begin_pos, parent.source_range.end_pos) "#{modifier_range.source}\n" "#{indentation(node)}" "#{assignment.join("\n#{indentation(node)}")}" "\n#{offset(node)}end" end
correction_range()
click to toggle source
# File lib/rubocop/cop/style/parallel_assignment.rb, line 234 def correction_range node.parent.source_range end