lib/mongoid/contextual/map_reduce.rb
# Specifies where the map/reduce output is to be stored.
# Please see MongoDB documentation for supported map reduce options.
#
# @example Store output in memory.
#   map_reduce.out(inline: 1)
#
# @example Store output in a collection, replacing existing documents.
#   map_reduce.out(replace: "collection_name")
#
# @example Store output in a collection, merging existing documents.
#   map_reduce.out(merge: "collection_name")
#
# @example Store output in a collection, reducing existing documents.
#   map_reduce.out(reduce: "collection_name")
#
# @example Return results from map reduce.
#   map_reduce.out(inline: 1)
#
# @param [ Hash ] location The place to store the results.
#
# @return [ MapReduce ] The map/reduce object.
Specifies where the map/reduce output is to be stored.
Please see MongoDB documentation for supported map reduce options.
Specifies where the map / reduce output is to be stored . Please see MongoDB documentation for supported map reduce options .
def out(location)
        normalized = location.dup
        normalized.update_values do |value|
          value.is_a?(::Symbol) ? value.to_s : value
        end
        @map_reduce = @map_reduce.out(normalized)
        self
      end
def out ( location ) normalized = location . dup normalized . update_values do | value | value . is_a? ( :: Symbol ) ? value . to_s : value end @map_reduce = @map_reduce . out ( normalized ) self end
Specifies where the map/reduce output is to be stored.
Specifies where the map / reduce output is to be stored .
The map/reduce object.
The map / reduce object .
 MapReduce 
location
<not_specific>
<not_specific>
location The place to store the results.
location The place to store the results .
example
Store output in memory. map_reduce.out(inline: 1)
Store output in memory . map_reduce . out ( inline : 1 )
example
Store output in a collection, replacing existing documents. map_reduce.out(replace: "collection_name")
Store output in a collection replacing existing documents . map_reduce . out ( replace : " collection_name " )
example
Store output in a collection, merging existing documents. map_reduce.out(merge: "collection_name")
Store output in a collection merging existing documents . map_reduce . out ( merge : " collection_name " )
example
Store output in a collection, reducing existing documents. map_reduce.out(reduce: "collection_name")
Store output in a collection reducing existing documents . map_reduce . out ( reduce : " collection_name " )
example
Return results from map reduce. map_reduce.out(inline: 1)
Return results from map reduce . map_reduce . out ( inline : 1 )