Switching parameter name in Collection#group from key to opts to fix YARD doc
This commit is contained in:
parent
153bedf5f6
commit
285752a7ad
|
@ -598,10 +598,10 @@ module Mongo
|
||||||
if opts.is_a? Array
|
if opts.is_a? Array
|
||||||
key_type = "key"
|
key_type = "key"
|
||||||
key_value = {}
|
key_value = {}
|
||||||
key.each { |k| key_value[k] = 1 }
|
opts.each { |k| key_value[k] = 1 }
|
||||||
else
|
else
|
||||||
key_type = "$keyf"
|
key_type = "$keyf"
|
||||||
key_value = key.is_a?(BSON::Code) ? key : BSON::Code.new(key)
|
key_value = opts.is_a?(BSON::Code) ? opts : BSON::Code.new(opts)
|
||||||
end
|
end
|
||||||
|
|
||||||
group_command["group"][key_type] = key_value
|
group_command["group"][key_type] = key_value
|
||||||
|
|
Loading…
Reference in New Issue