class Bogo::Retry::Linear
Linear
retry implementation
Attributes
wait_interval[R]
@return [Numeric]
Public Class Methods
new(args={}, &block)
click to toggle source
Create a new linear retry instance
@param args [Hash] @option args [Numeric] :wait_interval Defaults to 5 seconds @return [self]
Calls superclass method
Bogo::Retry::new
# File lib/bogo/retry.rb, line 150 def initialize(args={}, &block) @wait_interval = args[:wait_interval].to_f unless(@wait_interval > 0) @wait_interval = 5 end super end
Protected Instance Methods
wait_on_failure(*_)
click to toggle source
@return [Numeric] wait time
# File lib/bogo/retry.rb, line 161 def wait_on_failure(*_) wait_interval * attempts end