Module: ActiveJob::Interactor::ClassMethods

Defined in:
lib/active_job/interactor.rb

Instance Method Summary collapse

Instance Method Details

#call_later(*args, **context) ⇒ Object Also known as: perform_later



21
22
23
24
25
26
27
# File 'lib/active_job/interactor.rb', line 21

def call_later(*args, **context)
  if job == ActiveJob::Interactor::Job
    job.perform_later(*[self.name].concat(args), **context)
  else
    job.perform_later(*args, **context)
  end
end

#jobObject



15
16
17
18
19
# File 'lib/active_job/interactor.rb', line 15

def job
  @job || "#{self.name}Job".constantize
rescue NameError => e
  ActiveJob::Interactor::Job
end

#job=(klass) ⇒ Object



11
12
13
# File 'lib/active_job/interactor.rb', line 11

def job=(klass)
  @job = klass
end