Class: Operations::Components::Callback

Inherits:
Base
  • Object
show all
Defined in:
lib/operations/components/callback.rb

Overview

This base component handles ‘on_failure:` and `on_success:` callbacks passed to the command. Every callback entry is called outside of the operation transaction and any exception is rescued here so the result of the whole operation is not affected. Additionally, any callback failures will be reported with the command error reporter. The original operation result will be optionally passed as the second positional argument for the `call` method.

Direct Known Subclasses

OnFailure, OnSuccess

Constant Summary

Constants inherited from Base

Base::DEFAULT_NAMES_MAP, Base::MONADS_DO_WRAPPER_SIGNATURES