Method: Mongoid::Contextual::MapReduce#each
- Defined in:
- lib/mongoid/contextual/map_reduce.rb
#each ⇒ Enumerator
Iterates over each of the documents in the map/reduce, excluding the extra information that was passed back from the database.
34 35 36 37 38 39 40 41 42 |
# File 'lib/mongoid/contextual/map_reduce.rb', line 34 def each if block_given? documents.each do |doc| yield doc end else to_enum end end |