Module: Gricer::Mongoid::MapReduce::ClassMethods

Defined in:
lib/gricer/mongoid/map_reduce.rb

Instance Method Summary collapse

Instance Method Details

#map_reduce(map, reduce, options = {}) ⇒ Object



14
15
16
17
# File 'lib/gricer/mongoid/map_reduce.rb', line 14

def map_reduce(map, reduce, options = {}) 
  options = {:out => {:inline => 1}, :raw => true, :query => criteria.selector}.merge(options) 
  collection.map_reduce(map, reduce, options) 
end