Module: Negation
- Includes:
- Decision
- Defined in:
- lib/logic_operations.rb
Instance Method Summary
collapse
Methods included from Decision
#mcdc_pairs, #test_cases, #truth_table
Instance Method Details
#condition_identifiers ⇒ Object
53
54
55
|
# File 'lib/logic_operations.rb', line 53
def condition_identifiers
operand.condition_identifiers
end
|
#evaluate(conditions) ⇒ Object
57
58
59
|
# File 'lib/logic_operations.rb', line 57
def evaluate(conditions)
negate(operand.evaluate(conditions))
end
|
#negate(value) ⇒ Object
61
62
63
|
# File 'lib/logic_operations.rb', line 61
def negate(value)
1 ^ value
end
|