Module: MimeActor::Callbacks
- Extended by:
- ActiveSupport::Concern
- Includes:
- ActiveSupport::Callbacks, Validator
- Included in:
- Stage
- Defined in:
- lib/mime_actor/callbacks.rb
Overview
# MimeActor Callbacks
MimeActor provides hooks during the life cycle of an act. Available callbacks are:
-
append_act_before
-
append_act_around
-
append_act_after
-
act_before
-
act_around
-
act_after
-
prepend_act_before
-
prepend_act_around
-
prepend_act_after
NOTE: Calling the same callback multiple times will overwrite previous callback definitions.
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- LIFECYCLES =
i[before after around].freeze
Instance Method Summary collapse
-
#run_act_callbacks(action:, format:) ⇒ Object
Callbacks invocation sequence depends on the order of callback definition.
Instance Method Details
#run_act_callbacks(action:, format:) ⇒ Object
Callbacks invocation sequence depends on the order of callback definition.
187 188 189 190 191 192 193 194 |
# File 'lib/mime_actor/callbacks.rb', line 187 def run_act_callbacks(action:, format:) @_act_action = action.to_sym @_act_format = format.to_sym run_callbacks :act do yield if block_given? end end |