lib/attempt_this.rb in attempt_this-0.8.0 vs lib/attempt_this.rb in attempt_this-0.8.1
- old
+ new
@@ -1,11 +1,11 @@
-require 'attempt_this/attempt_object.rb'
-
-module AttemptThis
- # Attempts code block until it doesn't throw an exception or the end of enumerator has been reached.
- def attempt(enumerator, &block)
- raise(ArgumentError, 'Nil enumerator!') if enumerator.nil?
-
- impl = AttemptObject.new(enumerator)
- impl.attempt(block)
- end
-end
+require 'attempt_this/attempt_object.rb'
+
+module AttemptThis
+ # Attempts code block until it doesn't throw an exception or the end of enumerator has been reached.
+ def attempt(enumerator, &block)
+ raise(ArgumentError, 'Nil enumerator!') if enumerator.nil?
+
+ impl = AttemptObject.new(enumerator)
+ impl.attempt(block)
+ end
+end