class Stud::Try

A class implementing ‘retry-on-failure’

Example:

Try.new.try(5.times) { your_code }

A failure is indicated by any exception being raised. On success, the return value of the block is the return value of the try call.

On final failure (ran out of things to try), the last exception is raised.