progress-meter 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/progress-meter.rb +3 -2
- data/samples/hash-loop.rb +1 -1
- metadata +3 -3
data/lib/progress-meter.rb
CHANGED
@@ -18,9 +18,10 @@ class Progress
|
|
18
18
|
#
|
19
19
|
# If a description is given as a parameter it will show at the
|
20
20
|
# beginning of the progress report.
|
21
|
-
def Progress.monitor(desc = "")
|
21
|
+
def Progress.monitor(desc = "", num_reports = 100)
|
22
22
|
@@monitor = true
|
23
23
|
@@desc = desc
|
24
|
+
@@num_reports=num_reports
|
24
25
|
end
|
25
26
|
|
26
27
|
# Returns true if next loop must be monitored.
|
@@ -40,7 +41,7 @@ class Progress
|
|
40
41
|
@current = 1
|
41
42
|
@time = Time.now
|
42
43
|
@last_report = 0
|
43
|
-
@num_reports =
|
44
|
+
@num_reports = @@num_reports
|
44
45
|
@depth = depth
|
45
46
|
@desc = @@desc
|
46
47
|
@@monitor = false
|
data/samples/hash-loop.rb
CHANGED
metadata
CHANGED
@@ -3,9 +3,9 @@ rubygems_version: 0.9.4
|
|
3
3
|
specification_version: 1
|
4
4
|
name: progress-meter
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.0.
|
7
|
-
date:
|
8
|
-
summary: Allows to monitor the progress of some loop. Currently only Array.each and Hash.each
|
6
|
+
version: 0.0.3
|
7
|
+
date: 2008-01-18 00:00:00 +01:00
|
8
|
+
summary: Allows to monitor the progress of some loop. Currently only Array.each, Array.collect and Hash.each
|
9
9
|
require_paths:
|
10
10
|
- lib
|
11
11
|
email: mikisvaz@yahoo.com
|