class RuboCop::RSpec::Hook

def transform_metadata(meta)

def transform_metadata(meta)
  if meta.sym_type?
    { meta => true }
  else
    # This check is to be able to compare those two hooks:
    #
    #   before(:example, :special) { ... }
    #   before(:example, special: true) { ... }
    #
    # In the second case it's a node with a pair that has a value
    # of a `true_type?`.
    meta.pairs.map { |pair| { pair.key => transform_true(pair.value) } }
  end
end