class RuboCop::Cop::RSpec::EmptyLineAfterFinalLet


it { does_something }
let(:something) { other }
let(:foo) { bar }
# good
it { does_something }
let(:something) { other }
let(:foo) { bar }
# bad
@example
Checks if there is an empty line after the last let block.

def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler

rubocop:disable InternalAffairs/NumblockHandler
def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
  return unless example_group_with_body?(node)
  final_let = node.body.child_nodes.reverse.find { |child| let?(child) }
  return if final_let.nil?
  missing_separating_line_offense(final_let) do |method|
    format(MSG, let: method)
  end
end