Module: Bendy::Logical
- Defined in:
- lib/bendy/logical.rb
Overview
Some logical methods
Instance Method Summary collapse
-
#implies(antecedent) ⇒ Object
Material implication.
Instance Method Details
#implies(antecedent) ⇒ Object
Material implication
implies
is the common case where if the first thing is true (antecedent), then pay attention to the second thing (consequent). But if the first thing is false then the whole thing is true:
16 17 18 |
# File 'lib/bendy/logical.rb', line 16 def implies(antecedent) !!antecedent ? yield : true end |