Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Small gem for attempting to do something and returning errors if it fails

branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

attempt_to

Small gem for attempting to do something and returning errors if it fails.

Usage:

Try to connect 3 times to the network, otherwise exit.

attempt_to('connect to the network', 3) { TCPSocket.new("some.very.weird.domain.name", 9342) }

Something went wrong with that request. Please try again.