lib/attempt_this.rb in attempt_this-0.8.1 vs lib/attempt_this.rb in attempt_this-0.9.0
- old
+ new
@@ -1,11 +1,2 @@
-require 'attempt_this/attempt_object.rb'
+require 'attempt_this/attempt_this'
-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