Class: Mongoid::Relations::Embedded::Atomic::Pull
- Defined in:
- lib/mongoid/relations/embedded/atomic/pull.rb
Instance Attribute Summary
Attributes inherited from Operation
#documents, #options, #path, #selector
Instance Method Summary collapse
-
#operations ⇒ Hash
Get the merged operations for the single atomic set.
Methods inherited from Operation
#consume, #consumed?, #execute
Instance Method Details
#operations ⇒ Hash
Get the merged operations for the single atomic set.
17 18 19 20 21 22 23 24 25 |
# File 'lib/mongoid/relations/embedded/atomic/pull.rb', line 17 def operations { "$pull" => { path => { "_id" => { "$in" => documents.map { |doc| doc["_id"] } } } } } end |