Project

attempt_to

0.0
No commit activity in last 3 years
No release in over 3 years
AttemptTo calls a code block and re-tries it if it throws an exception. Otherwise exits
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

>= 2.0.0

Runtime

>= 0
 Project Readme

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) }