Method: Mongo::BulkWrite#initialize
- Defined in:
- lib/mongo/bulk_write.rb
#initialize(collection, requests, options = {}) ⇒ BulkWrite
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create the new bulk write operation.
128 129 130 131 132 133 134 135 |
# File 'lib/mongo/bulk_write.rb', line 128 def initialize(collection, requests, = {}) @collection = collection @requests = requests @options = || {} if @options[:timeout_ms] && @options[:timeout_ms] < 0 raise ArgumentError, "timeout_ms options must be non-negative integer" end end |