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_all_perform(*filters, &block) ⇒ Object
Define a callback to call after all organized interactors' #perform methods have been called.
-
#after_each_perform(*filters, &block) ⇒ Object
Define a callback to call after each organized interactor's #perform method has been called.
-
#around_all_perform(*filters, &block) ⇒ Object
Define a callback to call around all organized interactors' #perform method calls.
-
#around_each_perform(*filters, &block) ⇒ Object
Define a callback to call around each organized interactor's #perform method call.
-
#before_all_perform(*filters, &block) ⇒ Object
Define a callback to call before all organized interactors' #perform methods have been called.
-
#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_all_perform(*filters, &block) ⇒ Object
Define a callback to call after all organized interactors' #perform methods have been called.
180 181 182 |
# File 'lib/active_interactor/organizer/callbacks.rb', line 180 def after_all_perform(*filters, &block) set_callback(:all_perform, :after, *filters, &block) end |
#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_all_perform(*filters, &block) ⇒ Object
Define a callback to call around all organized interactors' #perform method calls.
224 225 226 |
# File 'lib/active_interactor/organizer/callbacks.rb', line 224 def around_all_perform(*filters, &block) set_callback(:all_perform, :around, *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_all_perform(*filters, &block) ⇒ Object
Define a callback to call before all organized interactors' #perform methods have been called.
263 264 265 |
# File 'lib/active_interactor/organizer/callbacks.rb', line 263 def before_all_perform(*filters, &block) set_callback(:all_perform, :before, *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 |