Class: RDocF95::Stats

Inherits:
Object
  • Object
show all
Defined in:
lib/rdoc-f95/stats.rb

Overview

Simple stats collector

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStats

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_classesObject

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_filesObject

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_methodsObject

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_modulesObject

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


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