Class: Delayed::DelayProxy

Inherits:
Object
  • Object
show all
Defined in:
lib/delayed/message_sending.rb

Instance Method Summary collapse

Constructor Details

#initialize(payload_class, target, options) ⇒ DelayProxy


3
4
5
6
7
# File 'lib/delayed/message_sending.rb', line 3

def initialize(payload_class, target, options)
  @payload_class = payload_class
  @target = target
  @options = options
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object


9
10
11
# File 'lib/delayed/message_sending.rb', line 9

def method_missing(method, *args)
  Job.enqueue({:payload_object => @payload_class.new(@target, method.to_sym, args)}.merge(@options))
end