tretry

Installation

gem 'tretry'

Usage

Simple retry three times (which is the default)

Tretry.try do
  # do something that might randomly fail.
end

Retry with options

Tretry.try(tries: 3, timeout: 1.5, errors: [SomeCustomError], wait: 1) do
  # do something.
end

Contributing to tretry

Copyright © 2012 Kasper Johansen. See LICENSE.txt for further details.