README.rdoc in progress-1.1.1 vs README.rdoc in progress-1.1.2
- old
+ new
@@ -63,32 +63,44 @@
end
Note - you will get WRONG progress if you use something like this:
10.times_with_progress('A') do |time|
- 10.times_with_progress('B'){ … }
- 10.times_with_progress('C'){ … }
+ 10.times_with_progress('B') do
+ # code
+ end
+ 10.times_with_progress('C') do
+ # code
+ end
end
But you can use this:
10.times_with_progress('A') do |time|
Progress.step 1, 2 do
- 10.times_with_progress('B'){ … }
+ 10.times_with_progress('B') do
+ # code
+ end
end
Progress.step 1, 2 do
- 10.times_with_progress('C'){ … }
+ 10.times_with_progress('C') do
+ # code
+ end
end
end
Or if you know that B runs 10 times faster than C:
10.times_with_progress('A') do |time|
Progress.step 1, 11 do
- 10.times_with_progress('B'){ … }
+ 10.times_with_progress('B') do
+ # code
+ end
end
Progress.step 10, 11 do
- 10.times_with_progress('C'){ … }
+ 10.times_with_progress('C') do
+ # code
+ end
end
end
== REQUIREMENTS: