Small gem for attempting to do something and returning errors if it fails.
Usage:
attempt_to('connect to the network', 3) { TCPSocket.new("some.very.weird.domain.name", 9342) }