Module: Delayed::MessageSending

Defined in:
lib/delayed/message_sending.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary collapse

Instance Method Details

#delay(options = {}) ⇒ Object Also known as: __delay__


15
16
17
# File 'lib/delayed/message_sending.rb', line 15

def delay(options = {})
  DelayProxy.new(PerformableMethod, self, options)
end

#send_at(time, method, *args) ⇒ Object


25
26
27
28
# File 'lib/delayed/message_sending.rb', line 25

def send_at(time, method, *args)
  warn '[DEPRECATION] `object.send_at(time, :method)` is deprecated. Use `object.delay(:run_at => time).method'
  __delay__(:run_at => time).__send__(method, *args)
end

#send_later(method, *args) ⇒ Object


20
21
22
23
# File 'lib/delayed/message_sending.rb', line 20

def send_later(method, *args)
  warn '[DEPRECATION] `object.send_later(:method)` is deprecated. Use `object.delay.method'
  __delay__.__send__(method, *args)
end