class RuboCop::Cop::Layout::EmptyLinesAroundBlockBody

Checks if empty lines around the bodies of blocks match the configuration.

@example EnforcedStyle: no_empty_lines (default)

# good

foo do |bar|
  # ...
end

@example EnforcedStyle: empty_lines

# good

foo do |bar|

  # ...

end

Constants

KIND

Public Instance Methods

on_block(node) click to toggle source
# File lib/rubocop/cop/layout/empty_lines_around_block_body.rb, line 30
def on_block(node)
  first_line = node.send_node.last_line

  check(node, node.body, adjusted_first_line: first_line)
end
Also aliased as: on_numblock
on_numblock(node)
Alias for: on_block