Class: Axiom::Function::Connective::Disjunction
- Inherits:
-
Axiom::Function::Connective
- Object
- Axiom::Function
- Axiom::Function::Connective
- Axiom::Function::Connective::Disjunction
- Includes:
- Binary, Binary::Invertible
- Defined in:
- lib/axiom/function/connective/disjunction.rb
Overview
A logical OR between expressions
Defined Under Namespace
Modules: Methods
Instance Attribute Summary
Attributes included from Operation::Binary
Class Method Summary collapse
-
.call(left, right) ⇒ Boolean
Evaluate the operands using a logical OR.
Instance Method Summary collapse
-
#inverse ⇒ Conjunction
Return the inverse connective.
Methods included from Binary
Methods included from Operation::Binary
Methods inherited from Axiom::Function::Connective
Methods inherited from Axiom::Function
extract_value, rename_attributes, #type
Methods included from Visitable
Class Method Details
.call(left, right) ⇒ Boolean
Evaluate the operands using a logical OR
33 34 35 |
# File 'lib/axiom/function/connective/disjunction.rb', line 33 def self.call(left, right) left || right end |
Instance Method Details
#inverse ⇒ Conjunction
Return the inverse connective
45 46 47 48 |
# File 'lib/axiom/function/connective/disjunction.rb', line 45 def inverse Conjunction.new(Negation.new(left), Negation.new(right)) .memoize(inverse: self) end |