Module: Delayed::MessageSending

Defined in:
lib/delayed/message_sending.rb

Defined Under Namespace

Modules: ClassMethods

Instance Method Summary (collapse)

Instance Method Details

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



18
19
20
# File 'lib/delayed/message_sending.rb', line 18

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

- (Object) send_at(time, method, *args)



28
29
30
31
# File 'lib/delayed/message_sending.rb', line 28

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

- (Object) send_later(method, *args)



23
24
25
26
# File 'lib/delayed/message_sending.rb', line 23

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