lib/mongoid/contextual/map_reduce.rb
# Iterates over each of the documents in the map/reduce, excluding the
# extra information that was passed back from the database.
#
# @example Iterate over the results.
#   map_reduce.each do |doc|
#     p doc
#   end
#
# @return [ Enumerator ] The enumerator.
Iterates over each of the documents in the map/reduce, excluding the
extra information that was passed back from the database.
Iterates over each of the documents in the map / reduce excluding the extra information that was passed back from the database .
def each
        validate_out!
        if block_given?
          @map_reduce.each do |doc|
            yield doc
          end
        else
          @map_reduce.to_enum
        end
      end
def each validate_out! if block_given? @map_reduce . each do | doc | yield doc end else @map_reduce . to_enum end end
Iterates over each of the documents in the map/reduce, excluding the
extra information that was passed back from the database.
Iterates over each of the documents in the map / reduce excluding the extra information that was passed back from the database .
None
 Enumerator 
example
Iterate over the results. map_reduce.each do |doc| p doc end
Iterate over the results . map_reduce . each do |doc| p doc end