Class: Delayed::DelayProxy
- Inherits:
- ActiveSupport::BasicObject
- Defined in:
- lib/delayed/message_sending.rb
Instance Method Summary collapse
-
#initialize(target, options) ⇒ DelayProxy
constructor
A new instance of DelayProxy.
- #method_missing(method, *args) ⇒ Object
Constructor Details
#initialize(target, options) ⇒ DelayProxy
Returns a new instance of DelayProxy.
5 6 7 8 |
# File 'lib/delayed/message_sending.rb', line 5 def initialize(target, ) @target = target @options = end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args) ⇒ Object
10 11 12 13 14 15 |
# File 'lib/delayed/message_sending.rb', line 10 def method_missing(method, *args) Job.create({ :payload_object => PerformableMethod.new(@target, method.to_sym, args), :priority => ::Delayed::Worker.default_priority }.merge(@options)) end |