Class: EasybillRestClient::RetryOn

Inherits:
Object
  • Object
show all
Defined in:
lib/easybill_rest_client/retry_on.rb

Instance Method Summary collapse

Constructor Details

#initialize(logger, tries, retry_cool_off_time) ⇒ RetryOn

Returns a new instance of RetryOn.



7
8
9
10
11
# File 'lib/easybill_rest_client/retry_on.rb', line 7

def initialize(logger, tries, retry_cool_off_time)
  @logger = logger
  @tries = tries
  @retry_cool_off_time = retry_cool_off_time
end

Instance Method Details

#retry_on(klass, &block) ⇒ Object



13
14
15
# File 'lib/easybill_rest_client/retry_on.rb', line 13

def retry_on(klass, &block)
  Retryable.retryable(retryable_opts(klass), &block)
end