Module: Origin::Mergeable
- Included in:
- Queryable
- Defined in:
- lib/origin/mergeable.rb
Overview
Contains behaviour 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! ⇒ nil
Reset the stratgies to nil, used after cloning.
-
#union ⇒ Mergeable
Instruct the next mergeable call to use union.
Instance Attribute Details
#strategy ⇒ Object
Returns the value of attribute strategy.
8 9 10 |
# File 'lib/origin/mergeable.rb', line 8 def strategy @strategy end |
#strategy The name of the current strategy.(Thenameofthecurrentstrategy.) ⇒ Object
8 |
# File 'lib/origin/mergeable.rb', line 8 attr_accessor :strategy |
Instance Method Details
#intersect ⇒ Mergeable
Instruct the next mergeable call to use intersection.
18 19 20 |
# File 'lib/origin/mergeable.rb', line 18 def intersect use(:__intersect__) end |
#override ⇒ Mergeable
Instruct the next mergeable call to use override.
30 31 32 |
# File 'lib/origin/mergeable.rb', line 30 def override use(:__override__) end |
#reset_strategies! ⇒ nil
Reset the stratgies to nil, used after cloning.
54 55 56 |
# File 'lib/origin/mergeable.rb', line 54 def reset_strategies! self.strategy, self.negating = nil, nil end |
#union ⇒ Mergeable
Instruct the next mergeable call to use union.
42 43 44 |
# File 'lib/origin/mergeable.rb', line 42 def union use(:__union__) end |