Class: Payola::Worker::ActiveJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- Payola::Worker::ActiveJob
- Defined in:
- lib/payola/worker/active_job.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.call(klass, *args) ⇒ Object
12 13 14 |
# File 'lib/payola/worker/active_job.rb', line 12 def self.call(klass, *args) perform_later(klass.to_s, *args) end |
.can_run? ⇒ Boolean
8 9 10 |
# File 'lib/payola/worker/active_job.rb', line 8 def self.can_run? defined?(::ActiveJob::Core) end |
Instance Method Details
#perform(klass, *args) ⇒ Object
16 17 18 |
# File 'lib/payola/worker/active_job.rb', line 16 def perform(klass, *args) klass.safe_constantize.call(*args) end |