You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: expect_in_hook.rb
    path of file: ./repos/rubocop-rspec/lib/rubocop/cop/rspec
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module RuboCop
  module Cop
    module RSpec
      # Do not use `expect` in hooks such as `before`.
      #
      # @e
    
        def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler
          return unless hook?(node)
          return if node.body.nil?

          expectation(node.body) do |expect|
            add_offense(expect.loc.selector,
                        message: message(expect, node))
          end
        end