Module: Mongoid::Criteria::Queryable::Mergeable
- Included in:
- Mongoid::Criteria::Queryable
- Defined in:
- lib/mongoid/criteria/queryable/mergeable.rb
Overview
Contains behavior for merging existing selection with new selection.
Instance Attribute Summary collapse
-
#strategy ⇒ Object
Returns the value of attribute strategy.
- #strategy The name of the current strategy.(Thenameofthecurrentstrategy.) ⇒ Object
Instance Method Summary collapse
-
#intersect ⇒ Mergeable
Instruct the next mergeable call to use intersection.
-
#override ⇒ Mergeable
Instruct the next mergeable call to use override.
-
#reset_strategies! ⇒ Criteria
Clear the current strategy and negating flag, used after cloning.
-
#union ⇒ Mergeable
Instruct the next mergeable call to use union.
Instance Attribute Details
#strategy ⇒ Object
Returns the value of attribute strategy.
11 12 13 |
# File 'lib/mongoid/criteria/queryable/mergeable.rb', line 11 def strategy @strategy end |
#strategy The name of the current strategy.(Thenameofthecurrentstrategy.) ⇒ Object
11 |
# File 'lib/mongoid/criteria/queryable/mergeable.rb', line 11 attr_accessor :strategy |
Instance Method Details
#intersect ⇒ Mergeable
Instruct the next mergeable call to use intersection.
19 20 21 |
# File 'lib/mongoid/criteria/queryable/mergeable.rb', line 19 def intersect use(:__intersect__) end |
#override ⇒ Mergeable
Instruct the next mergeable call to use override.
29 30 31 |
# File 'lib/mongoid/criteria/queryable/mergeable.rb', line 29 def override use(:__override__) end |
#reset_strategies! ⇒ Criteria
Clear the current strategy and negating flag, used after cloning.
49 50 51 52 53 |
# File 'lib/mongoid/criteria/queryable/mergeable.rb', line 49 def reset_strategies! self.strategy = nil self.negating = nil self end |
#union ⇒ Mergeable
Instruct the next mergeable call to use union.
39 40 41 |
# File 'lib/mongoid/criteria/queryable/mergeable.rb', line 39 def union use(:__union__) end |