class RSpec::Core::Hooks::HookCollections

def extract_scope_from(args)

def extract_scope_from(args)
  if known_scope?(args.first)
    normalized_scope_for(args.shift)
  elsif args.any? { |a| a.is_a?(Symbol) }
    error_message = "You must explicitly give a scope " \
      "(#{SCOPES.join(", ")}) or scope alias " \
      "(#{SCOPE_ALIASES.keys.join(", ")}) when using symbols as " \
      "metadata for a hook."
    raise ArgumentError.new error_message
  else
    :example
  end
end