module Boolean

Public Instance Methods

!=(other)
Alias for: xor
<=>(other)
Alias for: if_and_only_if
>(other)
Alias for: then
and(other) click to toggle source
# File lib/logic_analyzer/boolean.rb, line 2
def and(other)
  self && other
end
if_and_only_if(other) click to toggle source
# File lib/logic_analyzer/boolean.rb, line 18
def if_and_only_if(other)
  self.then(other) && other.then(self)
end
Also aliased as: <=>
not(expression = nil) click to toggle source
# File lib/logic_analyzer/boolean.rb, line 22
def not(expression = nil)
  if expression.nil?
    !self
  else
    !expression
  end
end
or(other) click to toggle source
# File lib/logic_analyzer/boolean.rb, line 6
def or(other)
  self || other
end
then(other) click to toggle source
# File lib/logic_analyzer/boolean.rb, line 14
def then(other)
  !self || other
end
Also aliased as: >
xor(other) click to toggle source
# File lib/logic_analyzer/boolean.rb, line 10
def xor(other)
  (self && !other) || (other && !self)
end
Also aliased as: !=