Object
# File lib/delayers/base.rb, line 5 def initialize(delay) @delay = delay end
Logs how long the delay is.
# File lib/delayers/base.rb, line 16 def log return if @logger.nil? @logger.debug("Delayer") { "delaying for #{self}" } end
Called before a reattempt to sleep a certain about of time.
# File lib/delayers/base.rb, line 10 def sleep log Kernel.sleep(@delay) end
Returns a string representation of the delay.
# File lib/delayers/base.rb, line 23 def to_s "#{@delay}s" end
[Validate]
Generated with the Darkfish Rdoc Generator 2.