each_with_progress 0.1 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/each_with_progress.rb +2 -2
- metadata +3 -3
data/lib/each_with_progress.rb
CHANGED
@@ -3,10 +3,10 @@ module Enumerable
|
|
3
3
|
out = STDERR
|
4
4
|
count = self.count
|
5
5
|
self.each_with_index do |element,i|
|
6
|
-
out.print sprintf("%s", ewp_makeProgress(i,count)) + "\r"
|
6
|
+
out.print sprintf("%s", ewp_makeProgress(i + 1,count)) + "\r"
|
7
7
|
block.call element
|
8
8
|
end
|
9
|
-
out.print sprintf("%s","
|
9
|
+
out.print sprintf("%s"," " + "\r")
|
10
10
|
self
|
11
11
|
end
|
12
12
|
|
metadata
CHANGED