Module: RuboCop::Cop::FirstElementLineBreak
- Included in:
- Style::FirstArrayElementLineBreak, Style::FirstHashElementLineBreak, Style::FirstMethodArgumentLineBreak, Style::FirstMethodParameterLineBreak
- Defined in:
- lib/rubocop/cop/mixin/first_element_line_break.rb
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.source_range, "\n") } end |