Module: RuboCop::Cop::FirstElementLineBreak

Overview

Common functionality for checking for a line break before the first element in a multi-line collection.

Instance Method Summary collapse

Instance Method Details

#autocorrect(node) ⇒ Object



8
9
10
# File 'lib/rubocop/cop/mixin/first_element_line_break.rb', line 8

def autocorrect(node)
  ->(corrector) { corrector.insert_before(node.loc.expression, "\n") }
end