Module: DoubleNegation

Extended by:
DoubleNegation
Included in:
DoubleNegation
Defined in:
lib/boolean_simplifier/rule/double_negation.rb

Instance Method Summary collapse

Instance Method Details

#simplify(expr) ⇒ Object



2
3
4
5
6
7
8
# File 'lib/boolean_simplifier/rule/double_negation.rb', line 2

def simplify(expr)
  if negation?(expr) && negation?(expr.parts[0])
    expr.parts[0].parts[0]
  else
    expr
  end
end