def extract_delegation_target(args)
      to = args.last.is_a?(Hash) && args.pop[:to] || :queryable
      to == :class ? 'self.class' : to
    end
def extract_delegation_target(args)
      to = args.last.is_a?(Hash) && args.pop[:to] || :queryable
      to == :class ? 'self.class' : to
    end
Internal: Extracts the :to option of the arguments, uses the internal
 query object as the target if no option is provided.