method
Ruby latest stable (v2_5_5)
-
0 notes -
Class: RDoc::Stats
- 1_8_6_287 (0)
- 1_8_7_72 (0)
- 1_8_7_330 (0)
- 1_9_1_378 (0)
- 1_9_2_180 (0)
- 1_9_3_125
- 1_9_3_392
- 2_1_10
- 2_2_9
- 2_4_6
- 2_5_5
- 2_6_3
- What's this?
print()
public
Hide source
# File lib/rdoc/stats.rb, line 75 def print classes = RDoc::TopLevel.classes num_classes = classes.length nodoc_classes = classes.select do |klass| klass.document_self and klass.comment.empty? end.length modules = RDoc::TopLevel.modules num_modules = modules.length nodoc_modules = modules.select do |mod| mod.document_self and mod.comment.empty? end.length items = num_classes + @num_constants + num_modules + @num_methods doc_items = items - nodoc_classes - @nodoc_constants - nodoc_modules - @nodoc_methods percent_doc = doc_items.to_f / items * 100 puts "Files: %5d" % @num_files puts "Classes: %5d (%5d undocumented)" % [num_classes, nodoc_classes] puts "Constants: %5d (%5d undocumented)" % [@num_constants, @nodoc_constants] puts "Modules: %5d (%5d undocumented)" % [num_modules, nodoc_modules] puts "Methods: %5d (%5d undocumented)" % [@num_methods, @nodoc_methods] puts "%6.2f%% documented" % percent_doc puts puts "Elapsed: %0.1fs" % (Time.now - @start) end