class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody
This cop checks if empty lines around the bodies of blocks match the configuration.
@example EnforcedStyle: empty_lines
# good foo do |bar| # ... end
@example EnforcedStyle: no_empty_lines (default)
# good foo do |bar| # ... end
Constants
- KIND
Public Instance Methods
autocorrect(node)
click to toggle source
# File lib/rubocop/cop/layout/empty_lines_around_block_body.rb, line 35 def autocorrect(node) EmptyLineCorrector.correct(node) end
on_block(node)
click to toggle source
# File lib/rubocop/cop/layout/empty_lines_around_block_body.rb, line 29 def on_block(node) first_line = node.send_node.last_line check(node, node.body, adjusted_first_line: first_line) end