Created
December 27, 2015 00:07
-
-
Save seanlinsley/1422c6bd4f6f961731fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
# your code | |
rescue | |
tries ||= 0 | |
(tries += 1) < 3 ? retry : raise | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment