debian-mirror-gitlab/debian/gems-compat/activejob-5.1.7/lib/active_job/configured_job.rb
2019-08-02 22:44:51 +05:30

16 lines
323 B
Ruby

module ActiveJob
class ConfiguredJob #:nodoc:
def initialize(job_class, options = {})
@options = options
@job_class = job_class
end
def perform_now(*args)
@job_class.new(*args).perform_now
end
def perform_later(*args)
@job_class.new(*args).enqueue @options
end
end
end