rdoc 8.0.0 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +1 -3
  3. data/RI.md +75 -75
  4. data/exe/rdoc +2 -2
  5. data/lib/rdoc/code_object/alias.rb +71 -69
  6. data/lib/rdoc/code_object/any_method.rb +305 -303
  7. data/lib/rdoc/code_object/attr.rb +150 -148
  8. data/lib/rdoc/code_object/class_module.rb +798 -792
  9. data/lib/rdoc/code_object/constant.rb +175 -173
  10. data/lib/rdoc/code_object/context/section.rb +142 -138
  11. data/lib/rdoc/code_object/context.rb +926 -958
  12. data/lib/rdoc/code_object/extend.rb +7 -5
  13. data/lib/rdoc/code_object/include.rb +7 -5
  14. data/lib/rdoc/code_object/method_attr.rb +326 -319
  15. data/lib/rdoc/code_object/mixin.rb +97 -95
  16. data/lib/rdoc/code_object/normal_class.rb +77 -78
  17. data/lib/rdoc/code_object/normal_module.rb +61 -59
  18. data/lib/rdoc/code_object/require.rb +23 -39
  19. data/lib/rdoc/code_object/single_class.rb +21 -19
  20. data/lib/rdoc/code_object/top_level.rb +212 -219
  21. data/lib/rdoc/code_object.rb +305 -303
  22. data/lib/rdoc/comment.rb +275 -273
  23. data/lib/rdoc/cross_reference.rb +192 -190
  24. data/lib/rdoc/encoding.rb +105 -103
  25. data/lib/rdoc/erb_partial.rb +13 -11
  26. data/lib/rdoc/erbio.rb +29 -27
  27. data/lib/rdoc/generator/aliki.rb +161 -153
  28. data/lib/rdoc/generator/darkfish.rb +645 -635
  29. data/lib/rdoc/generator/json_index.rb +233 -229
  30. data/lib/rdoc/generator/markup.rb +164 -146
  31. data/lib/rdoc/generator/pot/message_extractor.rb +57 -51
  32. data/lib/rdoc/generator/pot/po.rb +52 -51
  33. data/lib/rdoc/generator/pot/po_entry.rb +138 -132
  34. data/lib/rdoc/generator/pot.rb +85 -81
  35. data/lib/rdoc/generator/ri.rb +23 -19
  36. data/lib/rdoc/generator/template/aliki/DESIGN.md +6 -4
  37. data/lib/rdoc/generator/template/aliki/_footer.rhtml +1 -1
  38. data/lib/rdoc/generator/template/aliki/_head.rhtml +10 -10
  39. data/lib/rdoc/generator/template/aliki/_header.rhtml +29 -44
  40. data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +4 -4
  41. data/lib/rdoc/generator/template/aliki/css/rdoc.css +207 -178
  42. data/lib/rdoc/generator/template/aliki/js/aliki.js +60 -84
  43. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +1 -1
  44. data/lib/rdoc/generator.rb +48 -46
  45. data/lib/rdoc/i18n/locale.rb +99 -95
  46. data/lib/rdoc/i18n/text.rb +109 -105
  47. data/lib/rdoc/i18n.rb +7 -5
  48. data/lib/rdoc/markdown/byte_runtime.rb +80 -0
  49. data/lib/rdoc/markdown.kpeg +15 -11
  50. data/lib/rdoc/markdown.rb +40 -47
  51. data/lib/rdoc/markup/block_quote.rb +12 -8
  52. data/lib/rdoc/markup/document.rb +127 -123
  53. data/lib/rdoc/markup/formatter.rb +219 -215
  54. data/lib/rdoc/markup/include.rb +33 -29
  55. data/lib/rdoc/markup/indented_paragraph.rb +37 -33
  56. data/lib/rdoc/markup/inline_parser.rb +281 -277
  57. data/lib/rdoc/markup/list.rb +80 -88
  58. data/lib/rdoc/markup/list_item.rb +73 -85
  59. data/lib/rdoc/markup/paragraph.rb +23 -19
  60. data/lib/rdoc/markup/parser.rb +501 -497
  61. data/lib/rdoc/markup/pre_process.rb +283 -279
  62. data/lib/rdoc/markup/raw.rb +2 -2
  63. data/lib/rdoc/markup/rule.rb +16 -12
  64. data/lib/rdoc/markup/to_ansi.rb +143 -139
  65. data/lib/rdoc/markup/to_bs.rb +72 -68
  66. data/lib/rdoc/markup/to_html.rb +594 -565
  67. data/lib/rdoc/markup/to_html_crossref.rb +234 -230
  68. data/lib/rdoc/markup/to_html_snippet.rb +232 -227
  69. data/lib/rdoc/markup/to_joined_paragraph.rb +36 -32
  70. data/lib/rdoc/markup/to_label.rb +63 -59
  71. data/lib/rdoc/markup/to_markdown.rb +212 -208
  72. data/lib/rdoc/markup/to_rdoc.rb +336 -332
  73. data/lib/rdoc/markup/to_table_of_contents.rb +66 -62
  74. data/lib/rdoc/markup/to_test.rb +60 -56
  75. data/lib/rdoc/markup/to_tt_only.rb +84 -80
  76. data/lib/rdoc/markup/verbatim.rb +62 -58
  77. data/lib/rdoc/markup.rb +198 -196
  78. data/lib/rdoc/options.rb +1063 -1061
  79. data/lib/rdoc/parser/c.rb +1039 -1037
  80. data/lib/rdoc/parser/changelog.rb +319 -315
  81. data/lib/rdoc/parser/markdown.rb +17 -13
  82. data/lib/rdoc/parser/rbs.rb +239 -235
  83. data/lib/rdoc/parser/rd.rb +17 -13
  84. data/lib/rdoc/parser/ruby.rb +1245 -1124
  85. data/lib/rdoc/parser/ruby_colorizer.rb +263 -213
  86. data/lib/rdoc/parser/simple.rb +31 -27
  87. data/lib/rdoc/parser/text.rb +12 -8
  88. data/lib/rdoc/parser.rb +228 -220
  89. data/lib/rdoc/rbs_helper.rb +1 -1
  90. data/lib/rdoc/rd/inline.rb +57 -53
  91. data/lib/rdoc/rd.rb +90 -88
  92. data/lib/rdoc/rdoc.rb +500 -491
  93. data/lib/rdoc/ri/driver.rb +1140 -1135
  94. data/lib/rdoc/ri/formatter.rb +7 -3
  95. data/lib/rdoc/ri/paths.rb +140 -136
  96. data/lib/rdoc/ri/servlet.rb +354 -350
  97. data/lib/rdoc/ri/store.rb +4 -2
  98. data/lib/rdoc/ri/task.rb +55 -51
  99. data/lib/rdoc/ri.rb +14 -12
  100. data/lib/rdoc/rubygems_hook.rb +183 -181
  101. data/lib/rdoc/server.rb +349 -347
  102. data/lib/rdoc/stats/normal.rb +46 -42
  103. data/lib/rdoc/stats/quiet.rb +39 -35
  104. data/lib/rdoc/stats/verbose.rb +35 -31
  105. data/lib/rdoc/stats.rb +365 -363
  106. data/lib/rdoc/store.rb +888 -902
  107. data/lib/rdoc/task.rb +260 -256
  108. data/lib/rdoc/text.rb +135 -133
  109. data/lib/rdoc/token_stream.rb +101 -93
  110. data/lib/rdoc/tom_doc.rb +203 -201
  111. data/lib/rdoc/version.rb +1 -1
  112. metadata +4 -5
  113. data/lib/rdoc/markdown/literals.kpeg +0 -21
  114. data/lib/rdoc/markdown/literals.rb +0 -454
@@ -1,393 +1,395 @@
1
1
  # frozen_string_literal: true
2
- ##
3
- # Base class for the RDoc code tree.
4
- #
5
- # We contain the common stuff for contexts (which are containers) and other
6
- # elements (methods, attributes and so on)
7
- #
8
- # Here's the tree of the CodeObject subclasses:
9
- #
10
- # * RDoc::Context
11
- # * RDoc::TopLevel
12
- # * RDoc::ClassModule
13
- # * RDoc::NormalClass
14
- # * RDoc::NormalModule
15
- # * RDoc::SingleClass
16
- # * RDoc::MethodAttr
17
- # * RDoc::Attr
18
- # * RDoc::AnyMethod
19
- # * RDoc::Alias
20
- # * RDoc::Constant
21
- # * RDoc::Require
22
- # * RDoc::Mixin
23
- # * RDoc::Include
24
- # * RDoc::Extend
25
-
26
- class RDoc::CodeObject
27
-
28
- include RDoc::Text
29
-
2
+ module RDoc
30
3
  ##
31
- # Our comment
4
+ # Base class for the RDoc code tree.
5
+ #
6
+ # We contain the common stuff for contexts (which are containers) and other
7
+ # elements (methods, attributes and so on)
8
+ #
9
+ # Here's the tree of the CodeObject subclasses:
10
+ #
11
+ # * RDoc::Context
12
+ # * RDoc::TopLevel
13
+ # * RDoc::ClassModule
14
+ # * RDoc::NormalClass
15
+ # * RDoc::NormalModule
16
+ # * RDoc::SingleClass
17
+ # * RDoc::MethodAttr
18
+ # * RDoc::Attr
19
+ # * RDoc::AnyMethod
20
+ # * RDoc::Alias
21
+ # * RDoc::Constant
22
+ # * RDoc::Require
23
+ # * RDoc::Mixin
24
+ # * RDoc::Include
25
+ # * RDoc::Extend
32
26
 
33
- attr_reader :comment
27
+ class CodeObject
34
28
 
35
- ##
36
- # Do we document our children?
29
+ include Text
37
30
 
38
- attr_reader :document_children
31
+ ##
32
+ # Our comment
39
33
 
40
- ##
41
- # Do we document ourselves?
34
+ attr_reader :comment
42
35
 
43
- attr_reader :document_self
36
+ ##
37
+ # Do we document our children?
44
38
 
45
- ##
46
- # Are we done documenting (ie, did we come across a :enddoc:)?
39
+ attr_reader :document_children
47
40
 
48
- attr_reader :done_documenting
41
+ ##
42
+ # Do we document ourselves?
49
43
 
50
- ##
51
- # Which file this code object was defined in
44
+ attr_reader :document_self
52
45
 
53
- attr_reader :file
46
+ ##
47
+ # Are we done documenting (ie, did we come across a :enddoc:)?
54
48
 
55
- ##
56
- # Force documentation of this CodeObject
49
+ attr_reader :done_documenting
57
50
 
58
- attr_reader :force_documentation
51
+ ##
52
+ # Which file this code object was defined in
59
53
 
60
- ##
61
- # Line in #file where this CodeObject was defined
54
+ attr_reader :file
62
55
 
63
- attr_accessor :line
56
+ ##
57
+ # Force documentation of this CodeObject
64
58
 
65
- ##
66
- # Hash of arbitrary metadata for this CodeObject
59
+ attr_reader :force_documentation
67
60
 
68
- attr_reader :metadata
61
+ ##
62
+ # Line in #file where this CodeObject was defined
69
63
 
70
- ##
71
- # Sets the parent CodeObject
64
+ attr_accessor :line
72
65
 
73
- attr_writer :parent
66
+ ##
67
+ # Hash of arbitrary metadata for this CodeObject
74
68
 
75
- ##
76
- # Did we ever receive a +:nodoc:+ directive?
69
+ attr_reader :metadata
77
70
 
78
- attr_reader :received_nodoc
71
+ ##
72
+ # Sets the parent CodeObject
79
73
 
80
- ##
81
- # Set the section this CodeObject is in
74
+ attr_writer :parent
82
75
 
83
- attr_writer :section
76
+ ##
77
+ # Did we ever receive a +:nodoc:+ directive?
84
78
 
85
- ##
86
- # The RDoc::Store for this object.
79
+ attr_reader :received_nodoc
87
80
 
88
- attr_reader :store
81
+ ##
82
+ # Set the section this CodeObject is in
89
83
 
90
- ##
91
- # When mixed-in to a class, this points to the Context in which it was originally defined.
84
+ attr_writer :section
92
85
 
93
- attr_accessor :mixin_from
86
+ ##
87
+ # The RDoc::Store for this object.
94
88
 
95
- ##
96
- # Creates a new CodeObject that will document itself and its children
97
-
98
- def initialize
99
- @metadata = {}
100
- @comment = ''
101
- @parent = nil
102
- @parent_name = nil # for loading
103
- @parent_class = nil # for loading
104
- @section = nil
105
- @section_title = nil # for loading
106
- @file = nil
107
- @full_name = nil
108
- @store = nil
109
- @track_visibility = true
110
- @mixin_from = nil
111
-
112
- initialize_visibility
113
- end
89
+ attr_reader :store
114
90
 
115
- ##
116
- # Initializes state for visibility of this CodeObject and its children.
117
-
118
- def initialize_visibility # :nodoc:
119
- @document_children = true
120
- @document_self = true
121
- @done_documenting = false
122
- @force_documentation = false
123
- @received_nodoc = false
124
- @ignored = false
125
- @suppressed = false
126
- @track_visibility = true
127
- end
91
+ ##
92
+ # When mixed-in to a class, this points to the Context in which it was originally defined.
128
93
 
129
- ##
130
- # Replaces our comment with +comment+, unless it is empty.
131
-
132
- def comment=(comment)
133
- @comment = case comment
134
- when NilClass then ''
135
- when RDoc::Comment then comment.normalize
136
- else
137
- if comment and not comment.empty? then
138
- normalize_comment comment
139
- else
140
- # HACK correct fix is to have #initialize create @comment
141
- # with the correct encoding
142
- if String === @comment and @comment.empty? then
143
- @comment = RDoc::Encoding.change_encoding @comment, comment.encoding
144
- end
145
- @comment
146
- end
147
- end
148
- end
94
+ attr_accessor :mixin_from
149
95
 
150
- ##
151
- # Should this CodeObject be displayed in output?
152
- #
153
- # A code object should be displayed if:
154
- #
155
- # * The item didn't have a nodoc or wasn't in a container that had nodoc
156
- # * The item wasn't ignored
157
- # * The item has documentation and was not suppressed
96
+ ##
97
+ # Creates a new CodeObject that will document itself and its children
158
98
 
159
- def display?
160
- @document_self and not @ignored and
161
- (documented? or not @suppressed)
162
- end
99
+ def initialize
100
+ @metadata = {}
101
+ @comment = ''
102
+ @parent = nil
103
+ @parent_name = nil # for loading
104
+ @parent_class = nil # for loading
105
+ @section = nil
106
+ @section_title = nil # for loading
107
+ @file = nil
108
+ @full_name = nil
109
+ @store = nil
110
+ @track_visibility = true
111
+ @mixin_from = nil
163
112
 
164
- ##
165
- # Enables or disables documentation of this CodeObject's children unless it
166
- # has been turned off by :enddoc:
113
+ initialize_visibility
114
+ end
167
115
 
168
- def document_children=(document_children)
169
- return unless @track_visibility
116
+ ##
117
+ # Initializes state for visibility of this CodeObject and its children.
118
+
119
+ def initialize_visibility # :nodoc:
120
+ @document_children = true
121
+ @document_self = true
122
+ @done_documenting = false
123
+ @force_documentation = false
124
+ @received_nodoc = false
125
+ @ignored = false
126
+ @suppressed = false
127
+ @track_visibility = true
128
+ end
170
129
 
171
- @document_children = document_children unless @done_documenting
172
- end
130
+ ##
131
+ # Replaces our comment with +comment+, unless it is empty.
173
132
 
174
- ##
175
- # Enables or disables documentation of this CodeObject unless it has been
176
- # turned off by :enddoc:. If the argument is +nil+ it means the
177
- # documentation is turned off by +:nodoc:+.
133
+ def comment=(comment)
134
+ @comment = case comment
135
+ when NilClass then ''
136
+ when Comment then comment.normalize
137
+ else
138
+ if comment and not comment.empty?
139
+ normalize_comment comment
140
+ else
141
+ # HACK correct fix is to have #initialize create @comment
142
+ # with the correct encoding
143
+ if String === @comment and @comment.empty?
144
+ @comment = Encoding.change_encoding @comment, comment.encoding
145
+ end
146
+ @comment
147
+ end
148
+ end
149
+ end
178
150
 
179
- def document_self=(document_self)
180
- return unless @track_visibility
181
- return if @done_documenting
151
+ ##
152
+ # Should this CodeObject be displayed in output?
153
+ #
154
+ # A code object should be displayed if:
155
+ #
156
+ # * The item didn't have a nodoc or wasn't in a container that had nodoc
157
+ # * The item wasn't ignored
158
+ # * The item has documentation and was not suppressed
159
+
160
+ def display?
161
+ @document_self and not @ignored and
162
+ (documented? or not @suppressed)
163
+ end
182
164
 
183
- @document_self = document_self
184
- @received_nodoc = true if document_self.nil?
185
- end
165
+ ##
166
+ # Enables or disables documentation of this CodeObject's children unless it
167
+ # has been turned off by :enddoc:
186
168
 
187
- ##
188
- # Does this object have a comment with content or is #received_nodoc true?
169
+ def document_children=(document_children)
170
+ return unless @track_visibility
189
171
 
190
- def documented?
191
- @received_nodoc or !@comment.empty?
192
- end
172
+ @document_children = document_children unless @done_documenting
173
+ end
193
174
 
194
- ##
195
- # Turns documentation on/off, and turns on/off #document_self
196
- # and #document_children.
197
- #
198
- # Once documentation has been turned off (by +:enddoc:+),
199
- # the object will refuse to turn #document_self or
200
- # #document_children on, so +:doc:+ and +:start_doc:+ directives
201
- # will have no effect in the current file.
202
-
203
- def done_documenting=(value)
204
- return unless @track_visibility
205
- @done_documenting = value
206
- @document_self = !value
207
- @document_children = @document_self
208
- end
175
+ ##
176
+ # Enables or disables documentation of this CodeObject unless it has been
177
+ # turned off by :enddoc:. If the argument is +nil+ it means the
178
+ # documentation is turned off by +:nodoc:+.
209
179
 
210
- ##
211
- # File name where this CodeObject was found.
212
- #
213
- # See also RDoc::Context#in_files
180
+ def document_self=(document_self)
181
+ return unless @track_visibility
182
+ return if @done_documenting
214
183
 
215
- def file_name
216
- return unless @file
184
+ @document_self = document_self
185
+ @received_nodoc = true if document_self.nil?
186
+ end
217
187
 
218
- @file.absolute_name
219
- end
188
+ ##
189
+ # Does this object have a comment with content or is #received_nodoc true?
220
190
 
221
- ##
222
- # Force the documentation of this object unless documentation
223
- # has been turned off by :enddoc:
224
- #--
225
- # HACK untested, was assigning to an ivar
191
+ def documented?
192
+ @received_nodoc or !@comment.empty?
193
+ end
226
194
 
227
- def force_documentation=(value)
228
- @force_documentation = value unless @done_documenting
229
- end
195
+ ##
196
+ # Turns documentation on/off, and turns on/off #document_self
197
+ # and #document_children.
198
+ #
199
+ # Once documentation has been turned off (by +:enddoc:+),
200
+ # the object will refuse to turn #document_self or
201
+ # #document_children on, so +:doc:+ and +:start_doc:+ directives
202
+ # will have no effect in the current file.
203
+
204
+ def done_documenting=(value)
205
+ return unless @track_visibility
206
+ @done_documenting = value
207
+ @document_self = !value
208
+ @document_children = @document_self
209
+ end
230
210
 
231
- ##
232
- # Sets the full_name overriding any computed full name.
233
- #
234
- # Set to +nil+ to clear RDoc's cached value
211
+ ##
212
+ # File name where this CodeObject was found.
213
+ #
214
+ # See also RDoc::Context#in_files
235
215
 
236
- def full_name=(full_name)
237
- @full_name = full_name
238
- end
216
+ def file_name
217
+ return unless @file
239
218
 
240
- ##
241
- # Use this to ignore a CodeObject and all its children until found again
242
- # (#record_location is called). An ignored item will not be displayed in
243
- # documentation.
244
- #
245
- # See github issue #55
246
- #
247
- # The ignored status is temporary in order to allow implementation details
248
- # to be hidden. At the end of processing a file RDoc allows all classes
249
- # and modules to add new documentation to previously created classes.
250
- #
251
- # If a class was ignored (via stopdoc) then reopened later with additional
252
- # documentation it should be displayed. If a class was ignored and never
253
- # reopened it should not be displayed. The ignore flag allows this to
254
- # occur.
219
+ @file.absolute_name
220
+ end
255
221
 
256
- def ignore
257
- return unless @track_visibility
222
+ ##
223
+ # Force the documentation of this object unless documentation
224
+ # has been turned off by :enddoc:
225
+ #--
226
+ # HACK untested, was assigning to an ivar
258
227
 
259
- @ignored = true
228
+ def force_documentation=(value)
229
+ @force_documentation = value unless @done_documenting
230
+ end
260
231
 
261
- stop_doc
262
- end
232
+ ##
233
+ # Sets the full_name overriding any computed full name.
234
+ #
235
+ # Set to +nil+ to clear RDoc's cached value
263
236
 
264
- ##
265
- # Has this class been ignored?
266
- #
267
- # See also #ignore
237
+ def full_name=(full_name)
238
+ @full_name = full_name
239
+ end
268
240
 
269
- def ignored?
270
- @ignored
271
- end
241
+ ##
242
+ # Use this to ignore a CodeObject and all its children until found again
243
+ # (#record_location is called). An ignored item will not be displayed in
244
+ # documentation.
245
+ #
246
+ # See github issue #55
247
+ #
248
+ # The ignored status is temporary in order to allow implementation details
249
+ # to be hidden. At the end of processing a file RDoc allows all classes
250
+ # and modules to add new documentation to previously created classes.
251
+ #
252
+ # If a class was ignored (via stopdoc) then reopened later with additional
253
+ # documentation it should be displayed. If a class was ignored and never
254
+ # reopened it should not be displayed. The ignore flag allows this to
255
+ # occur.
256
+
257
+ def ignore
258
+ return unless @track_visibility
259
+
260
+ @ignored = true
261
+
262
+ stop_doc
263
+ end
272
264
 
273
- ##
274
- # The options instance from the store this CodeObject is attached to, or a
275
- # default options instance if the CodeObject is not attached.
276
- #
277
- # Used by: store= (visibility check), ClassModule#path, TopLevel#path,
278
- # ClassModule#embed_mixins
265
+ ##
266
+ # Has this class been ignored?
267
+ #
268
+ # See also #ignore
279
269
 
280
- def options
281
- @store&.options || RDoc::Options.new
282
- end
270
+ def ignored?
271
+ @ignored
272
+ end
283
273
 
284
- ##
285
- # Our parent CodeObject. The parent may be missing for classes loaded from
286
- # legacy RI data stores.
274
+ ##
275
+ # The options instance from the store this CodeObject is attached to, or a
276
+ # default options instance if the CodeObject is not attached.
277
+ #
278
+ # Used by: store= (visibility check), ClassModule#path, TopLevel#path,
279
+ # ClassModule#embed_mixins
287
280
 
288
- def parent
289
- return @parent if @parent
290
- return nil unless @parent_name
281
+ def options
282
+ @store&.options || Options.new
283
+ end
291
284
 
292
- if @parent_class == RDoc::TopLevel then
293
- @parent = @store.add_file @parent_name
294
- else
295
- @parent = @store.find_class_or_module @parent_name
285
+ ##
286
+ # Our parent CodeObject. The parent may be missing for classes loaded from
287
+ # legacy RI data stores.
296
288
 
289
+ def parent
297
290
  return @parent if @parent
291
+ return nil unless @parent_name
292
+
293
+ if @parent_class == TopLevel
294
+ @parent = @store.add_file @parent_name
295
+ else
296
+ @parent = @store.find_class_or_module @parent_name
298
297
 
299
- begin
300
- @parent = @store.load_class @parent_name
301
- rescue RDoc::Store::MissingFileError
302
- nil
298
+ return @parent if @parent
299
+
300
+ begin
301
+ @parent = @store.load_class @parent_name
302
+ rescue Store::MissingFileError
303
+ nil
304
+ end
303
305
  end
304
306
  end
305
- end
306
307
 
307
- ##
308
- # Name of our parent
308
+ ##
309
+ # Name of our parent
309
310
 
310
- def parent_name
311
- @parent ? @parent.full_name : '(unknown)'
312
- end
311
+ def parent_name
312
+ @parent ? @parent.full_name : '(unknown)'
313
+ end
313
314
 
314
- ##
315
- # Records the RDoc::TopLevel (file) where this code object was defined
315
+ ##
316
+ # Records the RDoc::TopLevel (file) where this code object was defined
316
317
 
317
- def record_location(top_level)
318
- @ignored = false
319
- @suppressed = false
320
- @file = top_level
321
- end
318
+ def record_location(top_level)
319
+ @ignored = false
320
+ @suppressed = false
321
+ @file = top_level
322
+ end
322
323
 
323
- ##
324
- # The section this CodeObject is in. Sections allow grouping of constants,
325
- # attributes and methods inside a class or module.
324
+ ##
325
+ # The section this CodeObject is in. Sections allow grouping of constants,
326
+ # attributes and methods inside a class or module.
326
327
 
327
- def section
328
- return @section if @section
328
+ def section
329
+ return @section if @section
329
330
 
330
- @section = parent.add_section @section_title if parent
331
- end
331
+ @section = parent.add_section @section_title if parent
332
+ end
332
333
 
333
- ##
334
- # Enable capture of documentation unless documentation has been
335
- # turned off by :enddoc:
334
+ ##
335
+ # Enable capture of documentation unless documentation has been
336
+ # turned off by :enddoc:
336
337
 
337
- def start_doc
338
- return if @done_documenting
338
+ def start_doc
339
+ return if @done_documenting
339
340
 
340
- @document_self = true
341
- @document_children = true
342
- @ignored = false
343
- @suppressed = false
344
- end
341
+ @document_self = true
342
+ @document_children = true
343
+ @ignored = false
344
+ @suppressed = false
345
+ end
345
346
 
346
- ##
347
- # Disable capture of documentation
347
+ ##
348
+ # Disable capture of documentation
348
349
 
349
- def stop_doc
350
- return unless @track_visibility
350
+ def stop_doc
351
+ return unless @track_visibility
351
352
 
352
- @document_self = false
353
- @document_children = false
354
- end
353
+ @document_self = false
354
+ @document_children = false
355
+ end
355
356
 
356
- ##
357
- # Sets the +store+ that contains this CodeObject
357
+ ##
358
+ # Sets the +store+ that contains this CodeObject
358
359
 
359
- def store=(store)
360
- @store = store
360
+ def store=(store)
361
+ @store = store
361
362
 
362
- return unless @track_visibility
363
+ return unless @track_visibility
363
364
 
364
- if :nodoc == options.visibility then
365
- initialize_visibility
366
- @track_visibility = false
365
+ if :nodoc == options.visibility
366
+ initialize_visibility
367
+ @track_visibility = false
368
+ end
367
369
  end
368
- end
369
370
 
370
- ##
371
- # Use this to suppress a CodeObject and all its children until the next file
372
- # it is seen in or documentation is discovered. A suppressed item with
373
- # documentation will be displayed while an ignored item with documentation
374
- # may not be displayed.
371
+ ##
372
+ # Use this to suppress a CodeObject and all its children until the next file
373
+ # it is seen in or documentation is discovered. A suppressed item with
374
+ # documentation will be displayed while an ignored item with documentation
375
+ # may not be displayed.
375
376
 
376
- def suppress
377
- return unless @track_visibility
377
+ def suppress
378
+ return unless @track_visibility
378
379
 
379
- @suppressed = true
380
+ @suppressed = true
380
381
 
381
- stop_doc
382
- end
382
+ stop_doc
383
+ end
383
384
 
384
- ##
385
- # Has this class been suppressed?
386
- #
387
- # See also #suppress
385
+ ##
386
+ # Has this class been suppressed?
387
+ #
388
+ # See also #suppress
388
389
 
389
- def suppressed?
390
- @suppressed
391
- end
390
+ def suppressed?
391
+ @suppressed
392
+ end
392
393
 
394
+ end
393
395
  end