Module | Mongoid::Persistence::Atomic::Operation |
In: |
lib/mongoid/persistence/atomic/operation.rb
|
This is the included module for all atomic operation objects.
document | [RW] | |
field | [RW] | |
options | [RW] | |
value | [RW] |
Initialize the new pullAll operation.
@example Create a new pullAll operation.
PullAll.new(document, :aliases, [ "Bond" ])
@param [ Document ] document The document to pullAll onto. @param [ Symbol ] field The name of the array field. @param [ Object ] value The value to pullAll. @param [ Hash ] options The persistence options.
@since 2.0.0
Get the collection to be used for persistence.
@example Get the collection.
operation.collection
@return [ Collection ] The root collection.
@since 2.1.0
All atomic operations use this with a block to ensure saftey options clear out after the execution.
@example Prepare the operation.
prepare do collection.update end
@return [ Object ] The yielded value.
@since 2.1.0