Sha256: 919d9d14bfb48f46211de33c9b458eb26f3fb10ee779f57115f84a44968c5da2

Contents?: true

Size: 203 Bytes

Versions: 6

Compression:

Stored size: 203 Bytes

Contents

module Pin
  require 'delegate'

  class RetryingClient < DelegateClass(Pin::Client)
    def make_request(*, times: 3)
      super
    rescue
      retry if (times -= 1) > 0
      raise
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pin_up-1.2.0 lib/pin_up/retrying_client.rb
pin_up-1.1.1 lib/pin_up/retrying_client.rb
pin_up-1.1.0 lib/pin_up/retrying_client.rb
pin_up-1.0.0 lib/pin_up/retrying_client.rb
pin_up-0.10.1 lib/pin_up/retrying_client.rb
pin_up-0.10.0 lib/pin_up/retrying_client.rb