Class: RulerCoaster::Logic::And
- Defined in:
- lib/ruler_coaster/logic/and.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/and.rb', line 4 def call(object) result = left.call(object) if result.success? right.call(object) else result end end |