Class: RetryDecorator
Overview
Simple retry decorator
Instance Method Summary collapse
-
#initialize(tries:, from: StandardError, backoff: false, sleep_duration: -1)) ⇒ RetryDecorator
constructor
private
Builds a new RetryDecorator.
Methods included from DecoratorDsl
#after, #around, #before, extended
Constructor Details
#initialize(tries:, from: StandardError, backoff: false, sleep_duration: -1)) ⇒ RetryDecorator
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Builds a new RetryDecorator
17 18 19 20 21 22 |
# File 'lib/retry_decorator.rb', line 17 def initialize(tries:, from: StandardError, backoff: false, sleep_duration: -1) @tries = tries @from = from @backoff = backoff @sleep_duration = sleep_duration end |