Module: NegationOfBoolean
- Extended by:
- NegationOfBoolean
- Included in:
- NegationOfBoolean
- Defined in:
- lib/boolean_simplifier/rule/negation_of_boolean.rb
Instance Method Summary collapse
Instance Method Details
#simplify(expr) ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 |
# File 'lib/boolean_simplifier/rule/negation_of_boolean.rb', line 2 def simplify(expr) if expr.class == Negation if expr.parts[0] == true return false elsif expr.parts[0] == false return true end end expr end |