# File lib/attempt.rb, line 61 def initialize(**options) @tries = options[:tries] || 3 # Reasonable default @interval = options[:interval] || 60 # Reasonable default @log = options[:log] # Should be an IO handle, if provided @increment = options[:increment] || 0 # Should be an integer, if provided @timeout = options[:timeout] || false # Wrap the code in a timeout block if provided @level = options[:level] || Exception # Level of exception to be caught @warnings = options[:warnings] || true # Errors are sent to STDERR as warnings if true end