Module: ActiveInteractor::Organizer::Perform::ClassMethods
- Included in:
- Base
- Defined in:
- lib/active_interactor/organizer/perform.rb
Overview
Organizer perform class methods. Because ClassMethods is a module classes should extend ClassMethods rather than inherit from it.
Class Attribute Summary collapse
-
.parallel ⇒ Boolean
readonly
If
true
the organizer will call #perform on its .organized interactors in parallel.
Instance Method Summary collapse
-
#perform_in_parallel ⇒ Object
Set ClassMethods.parallel to
true
.
Class Attribute Details
.parallel ⇒ Boolean (readonly)
If true
the organizer will call #perform on its
.organized interactors in parallel.
An organizer will have parallel false
by default.
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/active_interactor/organizer/perform.rb', line 27 module ClassMethods # Set {.parallel} to `true` # # @example a basic {Base organizer} set to perform in parallel # class MyOrganizer < ActiveInteractor::Organizer::Base # perform_in_parallel # end def perform_in_parallel self.parallel = true end end |
Instance Method Details
#perform_in_parallel ⇒ Object
Set parallel to true
34 35 36 |
# File 'lib/active_interactor/organizer/perform.rb', line 34 def perform_in_parallel self.parallel = true end |