Skip to content

Latest commit

 

History

History
33 lines (22 loc) · 634 Bytes

README.md

File metadata and controls

33 lines (22 loc) · 634 Bytes

Ruby Retry

A companion project for a blog post about retry in Ruby. This is a plain Ruby project, not Rails.

Setup

bundle install

Usage

Run an irb console with the application code loaded:

make console

Try it:

FileReader.new("example.txt").read_with_retry
# successful

FileReader.new("no-such-file.txt").read_with_retry
# multiple attempts, then fails

TODO

  • Tests!
  • Deal with method length in Retryable module.
  • Use Ruby Logger instead of puts.