module RuboCop::Cop::RSpec::Metadata

def on_block(node)

def on_block(node)
  rspec_configure(node) do |block_var|
    metadata_in_block(node, block_var) do |metadata_arguments|
      on_metadata_arguments(metadata_arguments)
    end
  end
  rspec_metadata(node) do |metadata_arguments|
    on_metadata_arguments(metadata_arguments)
  end
end

def on_metadata(_symbols, _hash)

def on_metadata(_symbols, _hash)
  raise ::NotImplementedError
end

def on_metadata_arguments(metadata_arguments)

def on_metadata_arguments(metadata_arguments)
  *symbols, last = metadata_arguments
  hash = nil
  case last&.type
  when :hash
    hash = last
  when :sym
    symbols << last
  end
  on_metadata(symbols, hash)
end