Module: Dry::Logic::Operators

Included in:
Dry::Logic::Operations::Abstract, Rule
Defined in:
lib/dry/logic/operators.rb

Instance Method Summary collapse

Instance Method Details

#and(other) ⇒ Object Also known as: &



6
7
8
# File 'lib/dry/logic/operators.rb', line 6

def and(other)
  Operations::And.new(self, other)
end

#or(other) ⇒ Object Also known as: |



11
12
13
# File 'lib/dry/logic/operators.rb', line 11

def or(other)
  Operations::Or.new(self, other)
end

#then(other) ⇒ Object Also known as: >



21
22
23
# File 'lib/dry/logic/operators.rb', line 21

def then(other)
  Operations::Implication.new(self, other)
end

#xor(other) ⇒ Object Also known as: ^



16
17
18
# File 'lib/dry/logic/operators.rb', line 16

def xor(other)
  Operations::Xor.new(self, other)
end