def aggregation(operation)
      return self unless operation
      clone.tap do |query|
        unless aggregating?
          query.pipeline.concat(query.selector.to_pipeline)
          query.pipeline.concat(query.options.to_pipeline)
          query.aggregating = true
        end
        yield(query.pipeline)
      end
    end
def aggregation(operation)
      return self unless operation
      clone.tap do |query|
        unless aggregating?
          query.pipeline.concat(query.selector.to_pipeline)
          query.pipeline.concat(query.options.to_pipeline)
          query.aggregating = true
        end
        yield(query.pipeline)
      end
    end
Add the aggregation operation.

 @api private

 @example Aggregate on the operation.
   aggregation(operation) do |pipeline|
     pipeline.push("$project" => operation)
   end

 @param [ Hash ] operation The operation for the pipeline.

 @return [ Aggregable ] The cloned aggregable.

 @since 2.0.0