Module: Dry::Logic::Operators
- Included in:
- Dry::Logic::Operations::Abstract, Rule
- Defined in:
- lib/dry/logic/operators.rb
Instance Method Summary collapse
- #and(other) ⇒ Object (also: #&)
- #or(other) ⇒ Object (also: #|)
- #then(other) ⇒ Object (also: #>)
- #xor(other) ⇒ Object (also: #^)
Instance Method Details
#and(other) ⇒ Object Also known as: &
4 5 6 |
# File 'lib/dry/logic/operators.rb', line 4 def and(other) Operations::And.new(self, other) end |
#or(other) ⇒ Object Also known as: |
9 10 11 |
# File 'lib/dry/logic/operators.rb', line 9 def or(other) Operations::Or.new(self, other) end |
#then(other) ⇒ Object Also known as: >
19 20 21 |
# File 'lib/dry/logic/operators.rb', line 19 def then(other) Operations::Implication.new(self, other) end |
#xor(other) ⇒ Object Also known as: ^
14 15 16 |
# File 'lib/dry/logic/operators.rb', line 14 def xor(other) Operations::Xor.new(self, other) end |