Class: ActiveJobDelayedExecution::Proxy

Inherits:
BasicObject
Defined in:
lib/active_job_delayed_execution/proxy.rb

Instance Method Summary collapse

Constructor Details

#initialize(object, options = {}) ⇒ Proxy

Returns a new instance of Proxy.



3
4
5
6
# File 'lib/active_job_delayed_execution/proxy.rb', line 3

def initialize(object, options = {})
  @object = object
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args) ⇒ Object



8
9
10
# File 'lib/active_job_delayed_execution/proxy.rb', line 8

def method_missing(name, *args)
  DelayedExecutionJob.set(@options).perform_later(@object, name.to_s, *args)
end