Module: AbstractNotifier::Callbacks
- Extended by:
- ActiveSupport::Concern
- Includes:
- ActiveSupport::Callbacks
- Included in:
- Base
- Defined in:
- lib/abstract_notifier/callbacks.rb
Overview
Add callbacks support to Abstract Notifier (requires ActiveSupport::Callbacks)
# Run method before seding notification
# NOTE: when `false` is returned the execution is halted
before_action :do_something
# after_ and around_ callbacks are also supported
after_action :cleanup
around_action :set_context
# Deliver callbacks are also available
before_deliver :do_something
# after_ and around_ callbacks are also supported
after_deliver :cleanup
around_deliver :set_context
Defined Under Namespace
Modules: InstanceExt
Constant Summary collapse
- CALLBACK_TERMINATOR =
->(_target, result) { result.call == false }