Class: Servitium::ServiceActiveJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
lib/servitium/service_active_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(class_name) ⇒ Object



5
6
7
8
9
10
11
12
13
# File 'lib/servitium/service_active_job.rb', line 5

def perform(class_name, *)
  service = class_name.constantize.call(*)

  if service.context.success?
    service.send(:async_success)
  else
    service.send(:async_failure)
  end
end