Sha256: 68680e941668fe69cabedb5a40ab4168e4ccbdc1bf7cbc6b976ebde95d2cc7fb

Contents?: true

Size: 300 Bytes

Versions: 9

Compression:

Stored size: 300 Bytes

Contents

module ProconBypassMan
  class Retryable
    def self.retryable(tries: , retried: 0, on_no_retry: [])
      return yield(retried)
    rescue *on_no_retry
      raise
    rescue
      if tries <= retried
        raise
      else
        retried = retried + 1
        retry
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
procon_bypass_man-0.3.6 lib/procon_bypass_man/support/retryable.rb
procon_bypass_man-0.3.5 lib/procon_bypass_man/support/retryable.rb
procon_bypass_man-0.3.4 lib/procon_bypass_man/support/retryable.rb
procon_bypass_man-0.3.3.1 lib/procon_bypass_man/support/retryable.rb
procon_bypass_man-0.3.3 lib/procon_bypass_man/support/retryable.rb
procon_bypass_man-0.3.2 lib/procon_bypass_man/support/retryable.rb
procon_bypass_man-0.3.1 lib/procon_bypass_man/support/retryable.rb
procon_bypass_man-0.3.0 lib/procon_bypass_man/support/retryable.rb
procon_bypass_man-0.2.3 lib/procon_bypass_man/support/retryable.rb