aboutsummaryrefslogblamecommitdiffstats
path: root/activejob/lib/active_job/configured_job.rb
blob: 2ff31f2dae3c3addb706bddf603ecb2a7bc007a9 (plain) (tree)
1
2
3
4

                              
                                           
                        











                                            
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