Method: Mongo::Collection::View::MapReduce#finalize

Defined in:
lib/mongo/collection/view/map_reduce.rb

#finalize(function = nil) ⇒ MapReduce, String

Set or get the finalize function for the operation.

Examples:

Set the finalize function.

map_reduce.finalize(function)

Parameters:

  • function (String) (defaults to: nil)

    The finalize js function.

Returns:

  • (MapReduce, String)

    The new MapReduce operation or the value of the function.

Since:

  • 2.0.0



106
107
108
# File 'lib/mongo/collection/view/map_reduce.rb', line 106

def finalize(function = nil)
  configure(:finalize, function)
end