Module: ActiveInteractor::Organizer::Callbacks::ClassMethods
- Included in:
- Base
- Defined in:
- lib/active_interactor/organizer/callbacks.rb
Overview
Organizer callback class methods. Because ClassMethods is a module classes should extend ClassMethods rather than inherit from it.
Instance Method Summary collapse
-
#after_each_perform(*filters, &block) ⇒ Object
Define a callback to call after each organized interactor's #perform method has been called.
-
#around_each_perform(*filters, &block) ⇒ Object
Define a callback to call around each organized interactor's #perform method call.
-
#before_each_perform(*filters, &block) ⇒ Object
Define a callback to call before each organized interactor's #perform method has been called.
Instance Method Details
#after_each_perform(*filters, &block) ⇒ Object
Define a callback to call after each organized interactor's #perform method has been called.
55 56 57 |
# File 'lib/active_interactor/organizer/callbacks.rb', line 55 def after_each_perform(*filters, &block) set_callback(:each_perform, :after, *filters, &block) end |
#around_each_perform(*filters, &block) ⇒ Object
Define a callback to call around each organized interactor's #perform method call.
101 102 103 |
# File 'lib/active_interactor/organizer/callbacks.rb', line 101 def around_each_perform(*filters, &block) set_callback(:each_perform, :around, *filters, &block) end |
#before_each_perform(*filters, &block) ⇒ Object
Define a callback to call before each organized interactor's #perform method has been called.
141 142 143 |
# File 'lib/active_interactor/organizer/callbacks.rb', line 141 def before_each_perform(*filters, &block) set_callback(:each_perform, :before, *filters, &block) end |