Module: MongoCoffee::Mongoid::Finders

Included in:
Mongoid::Finders
Defined in:
lib/mongo_coffee/mongoid/finders.rb

Instance Method Summary collapse

Instance Method Details

#caffeine_map_reduce(filename) ⇒ Object



4
5
6
7
8
9
# File 'lib/mongo_coffee/mongoid/finders.rb', line 4

def caffeine_map_reduce(filename)
  compiled_map    = MongoCoffee::Compiler.compile(filename, :map) 
  compiled_reduce = MongoCoffee::Compiler.compile(filename, :reduce) 

  map_reduce(compiled_map, compiled_reduce)
end