lib/mongoid/criteria/queryable/selector.rb
# Convert the selector to an aggregation pipeline entry.
#
# @example Convert the selector to a pipeline.
#   selector.to_pipeline
#
# @return [ Array<Hash> ] The pipeline entry for the selector.
#
# @since 2.0.0
Convert the selector to an aggregation pipeline entry.
Convert the selector to an aggregation pipeline entry .
def to_pipeline
          pipeline = []
          pipeline.push({ "$match" => self }) unless empty?
          pipeline
        end
def to_pipeline pipeline = [ ] pipeline . push ( { "$match" => self } ) unless empty? pipeline end
Convert the selector to an aggregation pipeline entry.
Convert the selector to an aggregation pipeline entry .
The pipeline entry for the selector.
The pipeline entry for the selector .
 Array<Hash> 
example
Convert the selector to a pipeline. selector.to_pipeline
Convert the selector to a pipeline . selector . to_pipeline
since
None