Class: Kodama::Client::RetryInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/kodama/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ RetryInfo

Returns a new instance of RetryInfo.



205
206
207
208
209
# File 'lib/kodama/client.rb', line 205

def initialize(options = {})
  @wait = options[:wait] || 3
  @limit = options[:limit] || 100
  @count = 0
end

Instance Attribute Details

#countObject

Returns the value of attribute count.



204
205
206
# File 'lib/kodama/client.rb', line 204

def count
  @count
end

#limitObject

Returns the value of attribute limit.



204
205
206
# File 'lib/kodama/client.rb', line 204

def limit
  @limit
end

#waitObject

Returns the value of attribute wait.



204
205
206
# File 'lib/kodama/client.rb', line 204

def wait
  @wait
end

Instance Method Details

#count_resetObject



219
220
221
# File 'lib/kodama/client.rb', line 219

def count_reset
  @count = 0
end

#count_upObject



215
216
217
# File 'lib/kodama/client.rb', line 215

def count_up
  @count += 1
end

#retryable?Boolean

Returns:

  • (Boolean)


211
212
213
# File 'lib/kodama/client.rb', line 211

def retryable?
  @count < @limit
end