Sha256: 89da56b5c7856cbaddf0e94b7f2f8b37bcbdcaa0d7e1d6da0830fe011c3dd455
Contents?: true
Size: 337 Bytes
Versions: 17
Compression:
Stored size: 337 Bytes
Contents
module Sym module Extensions module WithRetry def with_retry(retries: 3, fail_block: nil, &block) attempts = 0 yield if block_given? rescue StandardError => e raise(e) if attempts >= retries fail_block.call if fail_block attempts += 1 retry end end end end
Version data entries
17 entries across 17 versions & 1 rubygems