Method: Mongo::Collection::View::MapReduce#initialize
- Defined in:
- lib/mongo/collection/view/map_reduce.rb
#initialize(view, map, reduce, options = {}) ⇒ MapReduce
Initialize the map/reduce for the provided collection view, functions and options.
121 122 123 124 125 126 127 128 |
# File 'lib/mongo/collection/view/map_reduce.rb', line 121 def initialize(view, map, reduce, = {}) @view = view @map_function = map.dup.freeze @reduce_function = reduce.dup.freeze = BSON::Document.new().freeze client.log_warn('The map_reduce operation is deprecated, please use the aggregation pipeline instead') end |