README.rdoc in progress-0.1.0.3 vs README.rdoc in progress-0.1.1.0

- old
+ new

@@ -49,9 +49,52 @@ symbols += input Progress.step input.length end end +or just + + Progress('Input 100 symbols', 100) do + while symbols.length < 100 + input = gets.scan(/\S/) + symbols += input + Progress.step input.length + end + 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'){ … } + end + +But you can use this: + + 10.times_with_progress('A') do |time| + Progress('B,C', 2) do + Progress.step do + 10.times_with_progress('B'){ … } + end + Progress.step do + 10.times_with_progress('C'){ … } + end + end + end + +Or if you know that B runs 10 times faster than C: + + 10.times_with_progress('A') do |time| + Progress('B,C', 11) do + Progress.step 1 do + 10.times_with_progress('B'){ … } + end + Progress.step 10 do + 10.times_with_progress('C'){ … } + end + end + end + == REQUIREMENTS: * ruby ))) == INSTALL: