Skip to content
Browse files

Alias #delay to #__delay__ so it can still be called if #delay is ove…

…rridden
  • Loading branch information...
1 parent 92c1e49 commit 4a4de1fbd801f55d27c9ced45b01c8db97ce37ec @bkeepers bkeepers committed May 21, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/delayed/message_sending.rb
View
5 lib/delayed/message_sending.rb
@@ -18,15 +18,16 @@ module MessageSending
def delay(options = {})
DelayProxy.new(self, options)
end
+ alias __delay__ delay
def send_later(method, *args)
warn "[DEPRECATION] `object.send_later(:method)` is deprecated. Use `object.delay.method"
- delay.__send__(method, *args)
+ __delay__.__send__(method, *args)
end
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)
+ __delay__(:run_at => time).__send__(method, *args)
end
module ClassMethods

0 comments on commit 4a4de1f

Please sign in to comment.
Something went wrong with that request. Please try again.