class Axiom::Function::Connective::Disjunction
A logical OR between expressions
Public Class Methods
call(left, right)
click to toggle source
Evaluate the operands using a logical OR
@example with true operands
Disjunction.call(true, true) # => true
@example with true and false
Disjunction.call(true, false) # => true
@example with false and true
Disjunction.call(false, true) # => true
@example with false and false
Disjunction.call(false, false) # => false
@param [Boolean] left @param [Boolean] right
@return [Boolean]
@api public
# File lib/axiom/function/connective/disjunction.rb, line 33 def self.call(left, right) left || right end
Public Instance Methods
inverse()
click to toggle source
Return the inverse connective
@example
conjunction = disjunction.inverse
@return [Conjunction]
@api public
# File lib/axiom/function/connective/disjunction.rb, line 45 def inverse Conjunction.new(Negation.new(left), Negation.new(right)) .memoize(inverse: self) end