Module: Interactor::Organizer

Extended by:
ActiveSupport::Concern
Includes:
Interactor
Defined in:
lib/interactor/organizer.rb

Overview

Public: Interactor::Organizer methods. Because Interactor::Organizer is a module, custom Interactor::Organizer classes should include Interactor::Organizer rather than inherit from it.

Examples

class MyOrganizer
  include Interactor::Organizer

  organizer InteractorOne, InteractorTwo
end

Instance Method Summary collapse

Methods included from Interactor

#initialize, #run, #run!

Instance Method Details

#callObject



63
64
65
66
67
# File 'lib/interactor/organizer.rb', line 63

def call
  self.class.organized.inject(context) do |ctx, interactor|
    interactor.call!(ctx)
  end
end