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



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

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