Default value fuer max=10 or range=10, if it will be nil.
This commit is contained in:
parent
8877341fde
commit
c20b420d4a
1 changed files with 2 additions and 2 deletions
|
@ -33,8 +33,8 @@ class Retries
|
|||
attr_accessor :max, :range
|
||||
attr_reader :count, :last
|
||||
|
||||
def initialize max = 10, range = 10
|
||||
@max, @range, @count, @last = max, range, 0, Time.now
|
||||
def initialize max = nil, range = nil
|
||||
@max, @range, @count, @last = max || 10, range || 10, 0, Time.now
|
||||
end
|
||||
|
||||
def retry?
|
||||
|
|
Loading…
Reference in a new issue