Method: Mongo::Collection::View::MapReduce#out_collection_name

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

#out_collection_nameObject

Returns the collection name where the map-reduce result is written to. If the result is returned inline, returns nil.

Since:

  • 2.0.0

API:

  • semipublic



171
172
173
174
175
176
177
# File 'lib/mongo/collection/view/map_reduce.rb', line 171

def out_collection_name
  if options[:out].respond_to?(:keys)
    options[:out][OUT_ACTIONS.find do |action|
      options[:out][action]
    end]
  end || options[:out]
end