Class: ActiveInteractor::Base

Inherits:
Object
  • Object
show all
Includes:
Interactor
Defined in:
lib/active_interactor/base.rb

Overview

The base interactor class. All interactors should inherit from Base.

Examples:

a basic interactor

class MyInteractor < ActiveInteractor::Base
  def perform
    context.called = true
  end
end

MyInteractor.perform
#=> <MyInteractor::Context called=true>

Author:

Since:

  • 0.0.1

Direct Known Subclasses

Organizer

Instance Method Summary collapse

Methods included from Interactor

included, #options, #perform, #rollback, #with_options

Instance Method Details

#dupBase

Duplicates an instance of ActiveInteractor::Base

Returns:

Since:

  • 1.0.0-alpha.1


25
26
27
# File 'lib/active_interactor/base.rb', line 25

def dup
  self.class.new(context.dup)
end