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.

Author:

Since:

  • 1.0.0

Class Attribute Summary collapse

Instance Method Summary collapse

Class Attribute Details

.parallelBoolean (readonly)

If true the organizer will call #perform on its .organized interactors in parallel. An organizer will have parallel false by default.

Returns:

Since:

  • 1.0.0



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_parallelObject

Set parallel to true

Examples:

a basic organizer set to perform in parallel

class MyOrganizer < ActiveInteractor::Organizer::Base
  perform_in_parallel
end

Since:

  • 1.0.0



34
35
36
# File 'lib/active_interactor/organizer/perform.rb', line 34

def perform_in_parallel
  self.parallel = true
end