Module: Cuscuz::Operation::Executor
- Defined in:
- lib/cuscuz/operation.rb
Instance Method Summary collapse
Instance Method Details
#call ⇒ Object
26 27 28 29 30 31 32 33 34 |
# File 'lib/cuscuz/operation.rb', line 26 def call result = super if RESULT_CLASSES === result result else raise InvalidResultTypeError.new(result.class) end end |
#call! ⇒ Object
36 37 38 39 40 41 42 43 44 |
# File 'lib/cuscuz/operation.rb', line 36 def call! result = call if result.success? result else raise FailedOperationError.new(self.class) end end |