Class: RulerCoaster::Logic::Not
- Defined in:
- lib/ruler_coaster/logic/not.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Methods included from Mixin
Constructor Details
This class inherits a constructor from RulerCoaster::Logic::Base
Instance Method Details
#call(object) ⇒ Object
4 5 6 7 8 9 10 11 12 |
# File 'lib/ruler_coaster/logic/not.rb', line 4 def call(object) result = left.call(object) if result.success? right.call(object).negation else result.negation end end |