Module: FunctionalInteractor

Extended by:
ActiveSupport::Concern
Included in:
Interactors::Anonymous, Interactors::Sequence, Interactors::Simple
Defined in:
lib/functional_interactor.rb

Overview

Include this to support interactor interface

Instance Method Summary collapse

Instance Method Details

#call(context) ⇒ Object



21
22
23
# File 'lib/functional_interactor.rb', line 21

def call(context)
  [:ok, context]
end

#compose(interactor) ⇒ Object Also known as: |

| aliases to compose, so you can do something like: (CreateOrder | ChargeCard.new(token: params) | SendThankYou).call



15
16
17
# File 'lib/functional_interactor.rb', line 15

def compose(interactor)
  Interactors::Sequence.new.compose(self).compose(interactor)
end