Class: RDocF95::Stats
- Inherits:
-
Object
- Object
- RDocF95::Stats
- Defined in:
- lib/rdoc-f95/stats.rb
Overview
Simple stats collector
Instance Attribute Summary collapse
-
#num_classes ⇒ Object
Returns the value of attribute num_classes.
-
#num_files ⇒ Object
Returns the value of attribute num_files.
-
#num_methods ⇒ Object
Returns the value of attribute num_methods.
-
#num_modules ⇒ Object
Returns the value of attribute num_modules.
Instance Method Summary collapse
-
#initialize ⇒ Stats
constructor
A new instance of Stats.
- #print ⇒ Object
Constructor Details
#initialize ⇒ Stats
Returns a new instance of Stats.
8 9 10 11 |
# File 'lib/rdoc-f95/stats.rb', line 8 def initialize @num_files = @num_classes = @num_modules = @num_methods = 0 @start = Time.now end |
Instance Attribute Details
#num_classes ⇒ Object
Returns the value of attribute num_classes.
6 7 8 |
# File 'lib/rdoc-f95/stats.rb', line 6 def num_classes @num_classes end |
#num_files ⇒ Object
Returns the value of attribute num_files.
6 7 8 |
# File 'lib/rdoc-f95/stats.rb', line 6 def num_files @num_files end |
#num_methods ⇒ Object
Returns the value of attribute num_methods.
6 7 8 |
# File 'lib/rdoc-f95/stats.rb', line 6 def num_methods @num_methods end |
#num_modules ⇒ Object
Returns the value of attribute num_modules.
6 7 8 |
# File 'lib/rdoc-f95/stats.rb', line 6 def num_modules @num_modules end |
Instance Method Details
#print ⇒ Object
13 14 15 16 17 18 19 |
# File 'lib/rdoc-f95/stats.rb', line 13 def print puts "Files: #@num_files" puts "Classes: #@num_classes" puts "Modules: #@num_modules" puts "Methods: #@num_methods" puts "Elapsed: " + sprintf("%0.3fs", Time.now - @start) end |