rdoc 2.5.11 → 3.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rdoc might be problematic. Click here for more details.

Files changed (113) hide show
  1. data.tar.gz.sig +0 -0
  2. data/.document +1 -0
  3. data/History.txt +95 -0
  4. data/Manifest.txt +13 -4
  5. data/README.txt +9 -3
  6. data/Rakefile +1 -1
  7. data/lib/rdoc.rb +15 -298
  8. data/lib/rdoc/alias.rb +65 -16
  9. data/lib/rdoc/any_method.rb +27 -150
  10. data/lib/rdoc/attr.rb +36 -115
  11. data/lib/rdoc/class_module.rb +236 -22
  12. data/lib/rdoc/code_object.rb +76 -31
  13. data/lib/rdoc/constant.rb +32 -4
  14. data/lib/rdoc/context.rb +494 -222
  15. data/lib/rdoc/encoding.rb +79 -0
  16. data/lib/rdoc/erbio.rb +37 -0
  17. data/lib/rdoc/gauntlet.rb +9 -5
  18. data/lib/rdoc/generator.rb +33 -1
  19. data/lib/rdoc/generator/darkfish.rb +284 -375
  20. data/lib/rdoc/generator/markup.rb +72 -36
  21. data/lib/rdoc/generator/ri.rb +4 -4
  22. data/lib/rdoc/generator/template/darkfish/classpage.rhtml +267 -274
  23. data/lib/rdoc/generator/template/darkfish/filepage.rhtml +91 -91
  24. data/lib/rdoc/generator/template/darkfish/index.rhtml +45 -45
  25. data/lib/rdoc/generator/template/darkfish/rdoc.css +298 -298
  26. data/lib/rdoc/include.rb +40 -1
  27. data/lib/rdoc/known_classes.rb +1 -0
  28. data/lib/rdoc/markup.rb +467 -2
  29. data/lib/rdoc/markup/attribute_manager.rb +24 -6
  30. data/lib/rdoc/markup/blank_line.rb +11 -3
  31. data/lib/rdoc/markup/document.rb +6 -0
  32. data/lib/rdoc/markup/formatter.rb +10 -0
  33. data/lib/rdoc/markup/formatter_test_case.rb +339 -3
  34. data/lib/rdoc/markup/heading.rb +3 -0
  35. data/lib/rdoc/markup/inline.rb +11 -1
  36. data/lib/rdoc/markup/list.rb +3 -0
  37. data/lib/rdoc/markup/list_item.rb +3 -0
  38. data/lib/rdoc/markup/paragraph.rb +3 -0
  39. data/lib/rdoc/markup/parser.rb +191 -237
  40. data/lib/rdoc/markup/{preprocess.rb → pre_process.rb} +50 -29
  41. data/lib/rdoc/markup/raw.rb +4 -0
  42. data/lib/rdoc/markup/rule.rb +3 -0
  43. data/lib/rdoc/markup/text_formatter_test_case.rb +116 -0
  44. data/lib/rdoc/markup/to_ansi.rb +14 -2
  45. data/lib/rdoc/markup/to_bs.rb +8 -2
  46. data/lib/rdoc/markup/to_html.rb +84 -91
  47. data/lib/rdoc/markup/to_html_crossref.rb +77 -26
  48. data/lib/rdoc/markup/to_rdoc.rb +94 -49
  49. data/lib/rdoc/markup/to_test.rb +9 -1
  50. data/lib/rdoc/markup/verbatim.rb +6 -3
  51. data/lib/rdoc/method_attr.rb +353 -0
  52. data/lib/rdoc/normal_class.rb +11 -2
  53. data/lib/rdoc/normal_module.rb +0 -5
  54. data/lib/rdoc/options.rb +373 -82
  55. data/lib/rdoc/parser.rb +59 -23
  56. data/lib/rdoc/parser/c.rb +224 -86
  57. data/lib/rdoc/parser/ruby.rb +219 -111
  58. data/lib/rdoc/parser/ruby_tools.rb +4 -1
  59. data/lib/rdoc/parser/simple.rb +9 -4
  60. data/lib/rdoc/rdoc.rb +68 -28
  61. data/lib/rdoc/require.rb +21 -0
  62. data/lib/rdoc/ri/driver.rb +20 -10
  63. data/lib/rdoc/ri/paths.rb +2 -2
  64. data/lib/rdoc/ri/store.rb +22 -5
  65. data/lib/rdoc/ruby_lex.rb +11 -12
  66. data/lib/rdoc/ruby_token.rb +2 -2
  67. data/lib/rdoc/single_class.rb +2 -1
  68. data/lib/rdoc/stats.rb +202 -162
  69. data/lib/rdoc/stats/normal.rb +51 -0
  70. data/lib/rdoc/stats/quiet.rb +59 -0
  71. data/lib/rdoc/stats/verbose.rb +45 -0
  72. data/lib/rdoc/text.rb +133 -4
  73. data/lib/rdoc/{tokenstream.rb → token_stream.rb} +0 -2
  74. data/lib/rdoc/top_level.rb +230 -39
  75. data/test/test_attribute_manager.rb +58 -7
  76. data/test/test_rdoc_alias.rb +13 -0
  77. data/test/test_rdoc_any_method.rb +43 -2
  78. data/test/test_rdoc_attr.rb +15 -8
  79. data/test/test_rdoc_class_module.rb +133 -0
  80. data/test/test_rdoc_code_object.rb +62 -5
  81. data/test/test_rdoc_context.rb +72 -26
  82. data/test/test_rdoc_encoding.rb +145 -0
  83. data/test/test_rdoc_generator_darkfish.rb +119 -0
  84. data/test/test_rdoc_generator_ri.rb +22 -2
  85. data/test/test_rdoc_include.rb +79 -0
  86. data/test/test_rdoc_markup_attribute_manager.rb +4 -4
  87. data/test/test_rdoc_markup_parser.rb +134 -95
  88. data/test/test_rdoc_markup_pre_process.rb +7 -2
  89. data/test/test_rdoc_markup_to_ansi.rb +43 -153
  90. data/test/test_rdoc_markup_to_bs.rb +42 -156
  91. data/test/test_rdoc_markup_to_html.rb +130 -58
  92. data/test/test_rdoc_markup_to_html_crossref.rb +10 -10
  93. data/test/test_rdoc_markup_to_rdoc.rb +40 -151
  94. data/test/test_rdoc_method_attr.rb +122 -0
  95. data/test/test_rdoc_normal_class.rb +1 -1
  96. data/test/test_rdoc_normal_module.rb +6 -1
  97. data/test/test_rdoc_options.rb +237 -12
  98. data/test/test_rdoc_parser.rb +3 -22
  99. data/test/test_rdoc_parser_c.rb +203 -2
  100. data/test/test_rdoc_parser_ruby.rb +403 -89
  101. data/test/test_rdoc_parser_simple.rb +25 -1
  102. data/test/test_rdoc_rdoc.rb +44 -32
  103. data/test/test_rdoc_ri_driver.rb +29 -24
  104. data/test/test_rdoc_ri_store.rb +46 -3
  105. data/test/test_rdoc_task.rb +1 -1
  106. data/test/test_rdoc_text.rb +102 -8
  107. data/test/test_rdoc_top_level.rb +13 -4
  108. data/test/xref_data.rb +8 -0
  109. data/test/xref_test_case.rb +6 -0
  110. metadata +29 -19
  111. metadata.gz.sig +0 -0
  112. data/lib/rdoc/parser/perl.rb +0 -165
  113. data/test/test_rdoc_parser_perl.rb +0 -73
@@ -92,9 +92,9 @@ class RDoc::RubyLex
92
92
  end
93
93
 
94
94
  def inspect # :nodoc:
95
- "#<%s:0x%x lex_state %p space_seen %p>" % [
95
+ "#<%s:0x%x pos %d lex_state %p space_seen %p>" % [
96
96
  self.class, object_id,
97
- @lex_state, @space_seen,
97
+ @io.pos, @lex_state, @space_seen,
98
98
  ]
99
99
  end
100
100
 
@@ -149,6 +149,7 @@ class RDoc::RubyLex
149
149
  else
150
150
  @char_no += 1
151
151
  end
152
+
152
153
  c
153
154
  end
154
155
 
@@ -674,7 +675,7 @@ class RDoc::RubyLex
674
675
  tk_c = TkLPAREN
675
676
  end
676
677
  @indent_stack.push tk_c
677
- tk = Token(tk_c)
678
+ Token tk_c
678
679
  end
679
680
 
680
681
  @OP.def_rule("[]", proc{|op, io| @lex_state == EXPR_FNAME}) do
@@ -822,6 +823,12 @@ class RDoc::RubyLex
822
823
  end
823
824
  end
824
825
 
826
+ IDENT_RE = if defined? Encoding then
827
+ /[\w\u0080-\uFFFF]/u
828
+ else
829
+ /[\w\x80-\xFF]/
830
+ end
831
+
825
832
  def identify_identifier
826
833
  token = ""
827
834
  if peek(0) =~ /[$@]/
@@ -831,15 +838,7 @@ class RDoc::RubyLex
831
838
  end
832
839
  end
833
840
 
834
- # HACK to avoid a warning the regexp is hidden behind an eval
835
- # HACK need a better way to detect oniguruma
836
- @identifier_re ||= if defined? Encoding then
837
- eval '/[\p{Alnum}_]/u'
838
- else
839
- eval '/[\w\x80-\xff]/'
840
- end
841
-
842
- while (ch = getc) =~ @identifier_re
841
+ while (ch = getc) =~ IDENT_RE do
843
842
  print " :#{ch}: " if RDoc::RubyLex.debug?
844
843
  token.concat ch
845
844
  end
@@ -178,7 +178,7 @@ module RDoc::RubyToken
178
178
  end
179
179
 
180
180
  class TkUnknownChar < Token
181
- def initialize(seek, line_no, char_no, id)
181
+ def initialize(seek, line_no, char_no, name)
182
182
  super(seek, line_no, char_no)
183
183
  @name = name
184
184
  end
@@ -253,7 +253,7 @@ module RDoc::RubyToken
253
253
  [:TkWHILE, TkKW, "while", EXPR_BEG, :TkWHILE_MOD],
254
254
  [:TkUNTIL, TkKW, "until", EXPR_BEG, :TkUNTIL_MOD],
255
255
  [:TkFOR, TkKW, "for", EXPR_BEG],
256
- [:TkBREAK, TkKW, "break", EXPR_END],
256
+ [:TkBREAK, TkKW, "break", EXPR_MID],
257
257
  [:TkNEXT, TkKW, "next", EXPR_END],
258
258
  [:TkREDO, TkKW, "redo", EXPR_END],
259
259
  [:TkRETRY, TkKW, "retry", EXPR_END],
@@ -5,8 +5,9 @@ require 'rdoc/class_module'
5
5
 
6
6
  class RDoc::SingleClass < RDoc::ClassModule
7
7
 
8
+ # Adds the superclass to the included modules.
8
9
  def ancestors
9
- includes + [superclass]
10
+ superclass ? super + [superclass] : super
10
11
  end
11
12
 
12
13
  end
@@ -1,247 +1,287 @@
1
1
  require 'rdoc'
2
2
 
3
3
  ##
4
- # RDoc stats collector
4
+ # RDoc statistics collector which prints a summary and report of a project's
5
+ # documentation totals.
5
6
 
6
7
  class RDoc::Stats
7
8
 
8
- attr_reader :nodoc_constants
9
- attr_reader :nodoc_methods
9
+ ##
10
+ # Count of files parsed during parsing
10
11
 
11
- attr_reader :num_constants
12
- attr_reader :num_files
13
- attr_reader :num_methods
12
+ attr_reader :files_so_far
14
13
 
15
- attr_reader :total_files
14
+ ##
15
+ # Total number of files found
16
16
 
17
- def initialize(total_files, verbosity = 1)
18
- @nodoc_constants = 0
19
- @nodoc_methods = 0
17
+ attr_reader :num_files
20
18
 
21
- @num_constants = 0
22
- @num_files = 0
23
- @num_methods = 0
19
+ ##
20
+ # Creates a new Stats that will have +num_files+. +verbosity+ defaults to 1
21
+ # which will create an RDoc::Stats::Normal outputter.
24
22
 
25
- @total_files = total_files
23
+ def initialize num_files, verbosity = 1
24
+ @files_so_far = 0
25
+ @num_files = num_files
26
+ @fully_documented = nil
26
27
 
27
28
  @start = Time.now
28
29
 
29
30
  @display = case verbosity
30
- when 0 then Quiet.new total_files
31
- when 1 then Normal.new total_files
32
- else Verbose.new total_files
31
+ when 0 then Quiet.new num_files
32
+ when 1 then Normal.new num_files
33
+ else Verbose.new num_files
33
34
  end
34
35
  end
35
36
 
36
- def begin_adding
37
- @display.begin_adding
38
- end
37
+ ##
38
+ # Records the parsing of an alias +as+.
39
39
 
40
- def add_alias(as)
40
+ def add_alias as
41
41
  @display.print_alias as
42
- @num_methods += 1
43
- @nodoc_methods += 1 if as.document_self and as.comment.empty?
44
42
  end
45
43
 
46
- def add_class(klass)
44
+ ##
45
+ # Records the parsing of an attribute +attribute+
46
+
47
+ def add_attribute attribute
48
+ @display.print_attribute attribute
49
+ end
50
+
51
+ ##
52
+ # Records the parsing of a class +klass+
53
+
54
+ def add_class klass
47
55
  @display.print_class klass
48
56
  end
49
57
 
50
- def add_constant(constant)
58
+ ##
59
+ # Records the parsing of +constant+
60
+
61
+ def add_constant constant
51
62
  @display.print_constant constant
52
- @num_constants += 1
53
- @nodoc_constants += 1 if constant.document_self and constant.comment.empty?
54
63
  end
55
64
 
65
+ ##
66
+ # Records the parsing of +file+
67
+
56
68
  def add_file(file)
57
- @display.print_file @num_files, file
58
- @num_files += 1
69
+ @files_so_far += 1
70
+ @display.print_file @files_so_far, file
59
71
  end
60
72
 
73
+ ##
74
+ # Records the parsing of +method+
75
+
61
76
  def add_method(method)
62
77
  @display.print_method method
63
- @num_methods += 1
64
- @nodoc_methods += 1 if method.document_self and method.comment.empty?
65
78
  end
66
79
 
80
+ ##
81
+ # Records the parsing of a module +mod+
82
+
67
83
  def add_module(mod)
68
84
  @display.print_module mod
69
85
  end
70
86
 
71
- def done_adding
72
- @display.done_adding
73
- end
87
+ ##
88
+ # Call this to mark the beginning of parsing for display purposes
74
89
 
75
- def print
76
- classes = RDoc::TopLevel.classes
77
- num_classes = classes.length
78
- nodoc_classes = classes.select do |klass|
79
- klass.document_self and klass.comment.empty?
80
- end.length
81
-
82
- modules = RDoc::TopLevel.modules
83
- num_modules = modules.length
84
- nodoc_modules = modules.select do |mod|
85
- mod.document_self and mod.comment.empty?
86
- end.length
87
-
88
- items = num_classes + @num_constants + num_modules + @num_methods
89
- doc_items = items -
90
- nodoc_classes - @nodoc_constants - nodoc_modules - @nodoc_methods
91
-
92
- percent_doc = doc_items.to_f / items * 100
93
-
94
- puts "Files: %5d" % @num_files
95
- puts "Classes: %5d (%5d undocumented)" % [num_classes, nodoc_classes]
96
- puts "Constants: %5d (%5d undocumented)" %
97
- [@num_constants, @nodoc_constants]
98
- puts "Modules: %5d (%5d undocumented)" % [num_modules, nodoc_modules]
99
- puts "Methods: %5d (%5d undocumented)" % [@num_methods, @nodoc_methods]
100
- puts "%6.2f%% documented" % percent_doc
101
- puts
102
- puts "Elapsed: %0.1fs" % (Time.now - @start)
90
+ def begin_adding
91
+ @display.begin_adding
103
92
  end
104
93
 
105
94
  ##
106
- # Stats printer that prints nothing
107
-
108
- class Quiet
95
+ # Calculates documentation totals and percentages
109
96
 
110
- def initialize total_files
111
- @total_files = total_files
112
- end
113
-
114
- ##
115
- # Prints a message at the beginning of parsing
97
+ def calculate
98
+ return if @percent_doc
116
99
 
117
- def begin_adding(*) end
100
+ ucm = RDoc::TopLevel.unique_classes_and_modules
101
+ constants = []
102
+ ucm.each { |cm| constants.concat cm.constants }
118
103
 
119
- ##
120
- # Prints when an alias is added
104
+ methods = []
105
+ ucm.each { |cm| methods.concat cm.method_list }
121
106
 
122
- def print_alias(*) end
107
+ attributes = []
108
+ ucm.each { |cm| attributes.concat cm.attributes }
123
109
 
124
- ##
125
- # Prints when a class is added
110
+ @num_attributes, @undoc_attributes = doc_stats attributes
111
+ @num_classes, @undoc_classes = doc_stats RDoc::TopLevel.unique_classes
112
+ @num_constants, @undoc_constants = doc_stats constants
113
+ @num_methods, @undoc_methods = doc_stats methods
114
+ @num_modules, @undoc_modules = doc_stats RDoc::TopLevel.unique_modules
126
115
 
127
- def print_class(*) end
116
+ @num_items =
117
+ @num_attributes +
118
+ @num_classes +
119
+ @num_constants +
120
+ @num_methods +
121
+ @num_modules
128
122
 
129
- ##
130
- # Prints when a constant is added
123
+ @undoc_items =
124
+ @undoc_attributes +
125
+ @undoc_classes +
126
+ @undoc_constants +
127
+ @undoc_methods +
128
+ @undoc_modules
131
129
 
132
- def print_constant(*) end
130
+ @doc_items = @num_items - @undoc_items
133
131
 
134
- ##
135
- # Prints when a file is added
132
+ @fully_documented = (@num_items - @doc_items) == 0
136
133
 
137
- def print_file(*) end
138
-
139
- ##
140
- # Prints when a method is added
134
+ @percent_doc = @doc_items.to_f / @num_items * 100 if @num_items.nonzero?
135
+ end
141
136
 
142
- def print_method(*) end
137
+ ##
138
+ # Returns the length and number of undocumented items in +collection+.
143
139
 
144
- ##
145
- # Prints when a module is added
140
+ def doc_stats collection
141
+ [collection.length, collection.count { |item| not item.documented? }]
142
+ end
146
143
 
147
- def print_module(*) end
144
+ ##
145
+ # Call this to mark the end of parsing for display purposes
148
146
 
149
- ##
150
- # Prints when RDoc is done
147
+ def done_adding
148
+ @display.done_adding
149
+ end
151
150
 
152
- def done_adding(*) end
151
+ ##
152
+ # The documentation status of this project. +true+ when 100%, +false+ when
153
+ # less than 100% and +nil+ when unknown.
154
+ #
155
+ # Set by calling #calculate
153
156
 
157
+ def fully_documented?
158
+ @fully_documented
154
159
  end
155
160
 
156
161
  ##
157
- # Stats printer that prints just the files being documented with a progress
158
- # bar
162
+ # Returns a report on which items are not documented
159
163
 
160
- class Normal < Quiet
164
+ def report
165
+ report = []
161
166
 
162
- def begin_adding # :nodoc:
163
- puts "Parsing sources..."
164
- end
167
+ calculate
165
168
 
166
- ##
167
- # Prints a file with a progress bar
168
-
169
- def print_file(files_so_far, filename)
170
- progress_bar = sprintf("%3d%% [%2d/%2d] ",
171
- 100 * (files_so_far + 1) / @total_files,
172
- files_so_far + 1,
173
- @total_files)
174
-
175
- if $stdout.tty?
176
- # Print a progress bar, but make sure it fits on a single line. Filename
177
- # will be truncated if necessary.
178
- terminal_width = (ENV['COLUMNS'] || 80).to_i
179
- max_filename_size = terminal_width - progress_bar.size
180
- if filename.size > max_filename_size
181
- # Turn "some_long_filename.rb" to "...ong_filename.rb"
182
- filename = filename[(filename.size - max_filename_size) .. -1]
183
- filename[0..2] = "..."
184
- end
169
+ if @num_items == @doc_items then
170
+ report << '100% documentation!'
171
+ report << nil
172
+ report << 'Great Job!'
185
173
 
186
- # Pad the line with whitespaces so that leftover output from the
187
- # previous line doesn't show up.
188
- line = "#{progress_bar}#{filename}"
189
- padding = terminal_width - line.size
190
- line << (" " * padding) if padding > 0
191
-
192
- $stdout.print("#{line}\r")
193
- else
194
- $stdout.puts "#{progress_bar} #{filename}"
195
- end
196
- $stdout.flush
174
+ return report.join "\n"
197
175
  end
198
176
 
199
- def done_adding # :nodoc:
200
- puts
201
- end
177
+ report << 'The following items are not documented:'
178
+ report << nil
179
+
180
+ ucm = RDoc::TopLevel.unique_classes_and_modules
181
+
182
+ ucm.sort.each do |cm|
183
+ type = case cm # TODO #definition
184
+ when RDoc::NormalClass then 'class'
185
+ when RDoc::SingleClass then 'class <<'
186
+ when RDoc::NormalModule then 'module'
187
+ end
188
+
189
+ if cm.fully_documented? then
190
+ next
191
+ elsif cm.in_files.empty? or
192
+ (cm.constants.empty? and cm.method_list.empty?) then
193
+ report << "# #{type} #{cm.full_name} is referenced but empty."
194
+ report << '#'
195
+ report << '# It probably came from another project. ' \
196
+ 'I\'m sorry I\'m holding it against you.'
197
+ report << nil
198
+
199
+ next
200
+ elsif cm.documented? then
201
+ report << "#{type} #{cm.full_name} # is documented"
202
+ else
203
+ report << '# in files:'
202
204
 
203
- end
205
+ cm.in_files.each do |file|
206
+ report << "# #{file.full_name}"
207
+ end
204
208
 
205
- ##
206
- # Stats printer that prints everything documented, including the documented
207
- # status
209
+ report << nil
208
210
 
209
- class Verbose < Normal
211
+ report << "#{type} #{cm.full_name}"
212
+ end
210
213
 
211
- ##
212
- # Returns a marker for RDoc::CodeObject +co+ being undocumented
214
+ unless cm.constants.empty? then
215
+ report << nil
213
216
 
214
- def nodoc co
215
- " (undocumented)" unless co.documented?
216
- end
217
+ cm.each_constant do |constant|
218
+ next if constant.documented?
219
+ report << " # in file #{constant.file.full_name}"
220
+ report << " #{constant.name} = nil"
221
+ end
222
+ end
217
223
 
218
- def print_alias as # :nodoc:
219
- puts "\t\talias #{as.new_name} #{as.old_name}#{nodoc as}"
220
- end
224
+ unless cm.attributes.empty? then
225
+ report << nil
221
226
 
222
- def print_class(klass) # :nodoc:
223
- puts "\tclass #{klass.full_name}#{nodoc klass}"
224
- end
227
+ cm.each_attribute do |attr|
228
+ next if attr.documented?
229
+ report << " #{attr.definition} #{attr.name} " \
230
+ "# in file #{attr.file.full_name}"
231
+ end
232
+ end
225
233
 
226
- def print_constant(constant) # :nodoc:
227
- puts "\t\t#{constant.name}#{nodoc constant}"
228
- end
234
+ unless cm.method_list.empty? then
235
+ report << nil
229
236
 
230
- def print_file(files_so_far, file) # :nodoc:
231
- super
232
- puts
233
- end
237
+ cm.each_method do |method|
238
+ next if method.documented?
239
+ report << " # in file #{method.file.full_name}"
240
+ report << " def #{method.name}#{method.params}; end"
241
+ report << nil
242
+ end
243
+ end
234
244
 
235
- def print_method(method) # :nodoc:
236
- puts "\t\t#{method.singleton ? '::' : '#'}#{method.name}#{nodoc method}"
245
+ report << 'end'
246
+ report << nil
237
247
  end
238
248
 
239
- def print_module(mod) # :nodoc:
240
- puts "\tmodule #{mod.full_name}#{nodoc mod}"
241
- end
249
+ report.join "\n"
250
+ end
242
251
 
252
+ ##
253
+ # Returns a summary of the collected statistics.
254
+
255
+ def summary
256
+ calculate
257
+
258
+ report = []
259
+ report << 'Files: %5d' % @num_files
260
+ report << nil
261
+ report << 'Classes: %5d (%5d undocumented)' % [@num_classes,
262
+ @undoc_classes]
263
+ report << 'Modules: %5d (%5d undocumented)' % [@num_modules,
264
+ @undoc_modules]
265
+ report << 'Constants: %5d (%5d undocumented)' % [@num_constants,
266
+ @undoc_constants]
267
+ report << 'Attributes: %5d (%5d undocumented)' % [@num_attributes,
268
+ @undoc_attributes]
269
+ report << 'Methods: %5d (%5d undocumented)' % [@num_methods,
270
+ @undoc_methods]
271
+ report << nil
272
+ report << 'Total: %5d (%5d undocumented)' % [@num_items,
273
+ @undoc_items]
274
+
275
+ report << '%6.2f%% documented' % @percent_doc if @percent_doc
276
+ report << nil
277
+ report << 'Elapsed: %0.1fs' % (Time.now - @start)
278
+
279
+ report.join "\n"
243
280
  end
244
281
 
245
- end
282
+ autoload :Quiet, 'rdoc/stats/quiet'
283
+ autoload :Normal, 'rdoc/stats/normal'
284
+ autoload :Verbose, 'rdoc/stats/verbose'
246
285
 
286
+ end
247
287