In Files

  • rdoc/stats.rb

Files

Class/Module Index [+]

Quicksearch

RDoc::Stats

Simple stats collector

Attributes

num_classes[R]
num_files[R]
num_methods[R]
num_modules[R]

Public Class Methods

new(verbosity = 1) click to toggle source
 
               # File rdoc/stats.rb, line 13
def initialize(verbosity = 1)
  @num_classes = 0
  @num_files   = 0
  @num_methods = 0
  @num_modules = 0

  @start = Time.now

  @display = case verbosity
             when 0 then Quiet.new
             when 1 then Normal.new
             else        Verbose.new
             end
end
            

Public Instance Methods

add_alias(as) click to toggle source
 
               # File rdoc/stats.rb, line 28
def add_alias(as)
  @display.print_alias as
  @num_methods += 1
end
            
add_class(klass) click to toggle source
 
               # File rdoc/stats.rb, line 33
def add_class(klass)
  @display.print_class klass
  @num_classes += 1
end
            
add_file(file) click to toggle source
 
               # File rdoc/stats.rb, line 38
def add_file(file)
  @display.print_file file
  @num_files += 1
end
            
add_method(method) click to toggle source
 
               # File rdoc/stats.rb, line 43
def add_method(method)
  @display.print_method method
  @num_methods += 1
end
            
add_module(mod) click to toggle source
 
               # File rdoc/stats.rb, line 48
def add_module(mod)
  @display.print_module mod
  @num_modules += 1
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.

blog comments powered by Disqus