rdoc 6.13.0 → 6.14.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 (89) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +3 -1
  3. data/lib/rdoc/code_object/any_method.rb +4 -4
  4. data/lib/rdoc/code_object/attr.rb +3 -3
  5. data/lib/rdoc/code_object/class_module.rb +18 -16
  6. data/lib/rdoc/code_object/constant.rb +5 -5
  7. data/lib/rdoc/code_object/context/section.rb +7 -7
  8. data/lib/rdoc/code_object/context.rb +19 -19
  9. data/lib/rdoc/code_object/method_attr.rb +6 -6
  10. data/lib/rdoc/code_object/mixin.rb +3 -3
  11. data/lib/rdoc/code_object/normal_class.rb +1 -1
  12. data/lib/rdoc/code_object/normal_module.rb +1 -1
  13. data/lib/rdoc/code_object/single_class.rb +1 -1
  14. data/lib/rdoc/code_object/top_level.rb +10 -8
  15. data/lib/rdoc/code_object.rb +3 -3
  16. data/lib/rdoc/comment.rb +6 -6
  17. data/lib/rdoc/cross_reference.rb +3 -3
  18. data/lib/rdoc/encoding.rb +4 -4
  19. data/lib/rdoc/erb_partial.rb +1 -1
  20. data/lib/rdoc/erbio.rb +2 -2
  21. data/lib/rdoc/generator/darkfish.rb +15 -15
  22. data/lib/rdoc/generator/json_index.rb +3 -3
  23. data/lib/rdoc/generator/markup.rb +12 -0
  24. data/lib/rdoc/generator/pot/message_extractor.rb +4 -4
  25. data/lib/rdoc/generator/pot/po.rb +1 -1
  26. data/lib/rdoc/generator/pot/po_entry.rb +7 -7
  27. data/lib/rdoc/generator/pot.rb +1 -1
  28. data/lib/rdoc/generator/ri.rb +1 -1
  29. data/lib/rdoc/generator/template/darkfish/_head.rhtml +5 -0
  30. data/lib/rdoc/generator/template/darkfish/css/rdoc.css +2 -0
  31. data/lib/rdoc/markup/attribute_manager.rb +5 -5
  32. data/lib/rdoc/markup/attributes.rb +3 -3
  33. data/lib/rdoc/markup/blank_line.rb +2 -2
  34. data/lib/rdoc/markup/block_quote.rb +1 -1
  35. data/lib/rdoc/markup/document.rb +8 -8
  36. data/lib/rdoc/markup/formatter.rb +12 -12
  37. data/lib/rdoc/markup/hard_break.rb +3 -3
  38. data/lib/rdoc/markup/heading.rb +4 -4
  39. data/lib/rdoc/markup/include.rb +3 -3
  40. data/lib/rdoc/markup/indented_paragraph.rb +3 -3
  41. data/lib/rdoc/markup/list.rb +4 -4
  42. data/lib/rdoc/markup/list_item.rb +4 -4
  43. data/lib/rdoc/markup/paragraph.rb +2 -2
  44. data/lib/rdoc/markup/parser.rb +11 -11
  45. data/lib/rdoc/markup/pre_process.rb +6 -6
  46. data/lib/rdoc/markup/raw.rb +5 -5
  47. data/lib/rdoc/markup/rule.rb +2 -2
  48. data/lib/rdoc/markup/table.rb +4 -4
  49. data/lib/rdoc/markup/to_ansi.rb +3 -3
  50. data/lib/rdoc/markup/to_bs.rb +6 -6
  51. data/lib/rdoc/markup/to_html.rb +21 -16
  52. data/lib/rdoc/markup/to_html_crossref.rb +5 -5
  53. data/lib/rdoc/markup/to_html_snippet.rb +17 -17
  54. data/lib/rdoc/markup/to_joined_paragraph.rb +1 -1
  55. data/lib/rdoc/markup/to_label.rb +5 -5
  56. data/lib/rdoc/markup/to_markdown.rb +12 -12
  57. data/lib/rdoc/markup/to_rdoc.rb +29 -28
  58. data/lib/rdoc/markup/to_table_of_contents.rb +3 -3
  59. data/lib/rdoc/markup/to_test.rb +1 -1
  60. data/lib/rdoc/markup/to_tt_only.rb +8 -8
  61. data/lib/rdoc/markup/verbatim.rb +3 -3
  62. data/lib/rdoc/markup.rb +3 -3
  63. data/lib/rdoc/options.rb +31 -12
  64. data/lib/rdoc/parser/c.rb +16 -16
  65. data/lib/rdoc/parser/changelog.rb +9 -9
  66. data/lib/rdoc/parser/prism_ruby.rb +1 -1
  67. data/lib/rdoc/parser/ruby.rb +43 -43
  68. data/lib/rdoc/parser/simple.rb +2 -2
  69. data/lib/rdoc/parser.rb +8 -8
  70. data/lib/rdoc/rd/inline.rb +4 -4
  71. data/lib/rdoc/rd.rb +1 -1
  72. data/lib/rdoc/rdoc.rb +8 -8
  73. data/lib/rdoc/ri/driver.rb +49 -49
  74. data/lib/rdoc/ri/paths.rb +2 -2
  75. data/lib/rdoc/ri/task.rb +1 -1
  76. data/lib/rdoc/rubygems_hook.rb +14 -11
  77. data/lib/rdoc/servlet.rb +15 -15
  78. data/lib/rdoc/stats/normal.rb +1 -1
  79. data/lib/rdoc/stats/quiet.rb +1 -1
  80. data/lib/rdoc/stats/verbose.rb +3 -3
  81. data/lib/rdoc/stats.rb +12 -12
  82. data/lib/rdoc/store.rb +30 -30
  83. data/lib/rdoc/task.rb +2 -2
  84. data/lib/rdoc/text.rb +11 -11
  85. data/lib/rdoc/token_stream.rb +1 -1
  86. data/lib/rdoc/tom_doc.rb +7 -7
  87. data/lib/rdoc/version.rb +1 -1
  88. data/man/ri.1 +2 -0
  89. metadata +17 -3
@@ -8,15 +8,15 @@ class RDoc::Stats::Verbose < RDoc::Stats::Normal
8
8
  ##
9
9
  # Returns a marker for RDoc::CodeObject +co+ being undocumented
10
10
 
11
- def nodoc co
11
+ def nodoc(co)
12
12
  " (undocumented)" unless co.documented?
13
13
  end
14
14
 
15
- def print_alias as # :nodoc:
15
+ def print_alias(as) # :nodoc:
16
16
  puts " alias #{as.new_name} #{as.old_name}#{nodoc as}"
17
17
  end
18
18
 
19
- def print_attribute attribute # :nodoc:
19
+ def print_attribute(attribute) # :nodoc:
20
20
  puts " #{attribute.definition} #{attribute.name}#{nodoc attribute}"
21
21
  end
22
22
 
data/lib/rdoc/stats.rb CHANGED
@@ -26,7 +26,7 @@ class RDoc::Stats
26
26
  # Creates a new Stats that will have +num_files+. +verbosity+ defaults to 1
27
27
  # which will create an RDoc::Stats::Normal outputter.
28
28
 
29
- def initialize store, num_files, verbosity = 1
29
+ def initialize(store, num_files, verbosity = 1)
30
30
  @num_files = num_files
31
31
  @store = store
32
32
 
@@ -49,28 +49,28 @@ class RDoc::Stats
49
49
  ##
50
50
  # Records the parsing of an alias +as+.
51
51
 
52
- def add_alias as
52
+ def add_alias(as)
53
53
  @display.print_alias as
54
54
  end
55
55
 
56
56
  ##
57
57
  # Records the parsing of an attribute +attribute+
58
58
 
59
- def add_attribute attribute
59
+ def add_attribute(attribute)
60
60
  @display.print_attribute attribute
61
61
  end
62
62
 
63
63
  ##
64
64
  # Records the parsing of a class +klass+
65
65
 
66
- def add_class klass
66
+ def add_class(klass)
67
67
  @display.print_class klass
68
68
  end
69
69
 
70
70
  ##
71
71
  # Records the parsing of +constant+
72
72
 
73
- def add_constant constant
73
+ def add_constant(constant)
74
74
  @display.print_constant constant
75
75
  end
76
76
 
@@ -155,7 +155,7 @@ class RDoc::Stats
155
155
  # 0:: Classes, modules, constants, attributes, methods
156
156
  # 1:: Level 0 + method parameters
157
157
 
158
- def coverage_level= level
158
+ def coverage_level=(level)
159
159
  level = -1 unless level
160
160
 
161
161
  @coverage_level = level
@@ -164,7 +164,7 @@ class RDoc::Stats
164
164
  ##
165
165
  # Returns the length and number of undocumented items in +collection+.
166
166
 
167
- def doc_stats collection
167
+ def doc_stats(collection)
168
168
  visible = collection.select { |item| item.display? }
169
169
  [visible.length, visible.count { |item| not item.documented? }]
170
170
  end
@@ -256,7 +256,7 @@ class RDoc::Stats
256
256
  ##
257
257
  # Returns a report on undocumented attributes in ClassModule +cm+
258
258
 
259
- def report_attributes cm
259
+ def report_attributes(cm)
260
260
  return if cm.attributes.empty?
261
261
 
262
262
  report = []
@@ -274,7 +274,7 @@ class RDoc::Stats
274
274
  ##
275
275
  # Returns a report on undocumented items in ClassModule +cm+
276
276
 
277
- def report_class_module cm
277
+ def report_class_module(cm)
278
278
  return if cm.fully_documented? and @coverage_level.zero?
279
279
  return unless cm.display?
280
280
 
@@ -326,7 +326,7 @@ class RDoc::Stats
326
326
  ##
327
327
  # Returns a report on undocumented constants in ClassModule +cm+
328
328
 
329
- def report_constants cm
329
+ def report_constants(cm)
330
330
  return if cm.constants.empty?
331
331
 
332
332
  report = []
@@ -348,7 +348,7 @@ class RDoc::Stats
348
348
  ##
349
349
  # Returns a report on undocumented methods in ClassModule +cm+
350
350
 
351
- def report_methods cm
351
+ def report_methods(cm)
352
352
  return if cm.method_list.empty?
353
353
 
354
354
  report = []
@@ -436,7 +436,7 @@ class RDoc::Stats
436
436
  # Determines which parameters in +method+ were not documented. Returns a
437
437
  # total parameter count and an Array of undocumented methods.
438
438
 
439
- def undoc_params method
439
+ def undoc_params(method)
440
440
  @formatter ||= RDoc::Markup::ToTtOnly.new
441
441
 
442
442
  params = method.param_list
data/lib/rdoc/store.rb CHANGED
@@ -54,7 +54,7 @@ class RDoc::Store
54
54
  # Creates a new MissingFileError for the missing +file+ for the given
55
55
  # +name+ that should have been in the +store+.
56
56
 
57
- def initialize store, file, name
57
+ def initialize(store, file, name)
58
58
  @store = store
59
59
  @file = file
60
60
  @name = name
@@ -162,14 +162,14 @@ class RDoc::Store
162
162
  # Adds +module+ as an enclosure (namespace) for the given +variable+ for C
163
163
  # files.
164
164
 
165
- def add_c_enclosure variable, namespace
165
+ def add_c_enclosure(variable, namespace)
166
166
  @c_enclosure_classes[variable] = namespace
167
167
  end
168
168
 
169
169
  ##
170
170
  # Adds C variables from an RDoc::Parser::C
171
171
 
172
- def add_c_variables c_parser
172
+ def add_c_variables(c_parser)
173
173
  filename = c_parser.top_level.relative_name
174
174
 
175
175
  @c_class_variables[filename] = make_variable_map c_parser.classes
@@ -181,7 +181,7 @@ class RDoc::Store
181
181
  # Adds the file with +name+ as an RDoc::TopLevel to the store. Returns the
182
182
  # created RDoc::TopLevel.
183
183
 
184
- def add_file absolute_name, relative_name: absolute_name, parser: nil
184
+ def add_file(absolute_name, relative_name: absolute_name, parser: nil)
185
185
  unless top_level = @files_hash[relative_name] then
186
186
  top_level = RDoc::TopLevel.new absolute_name, relative_name
187
187
  top_level.parser = parser if parser
@@ -268,7 +268,7 @@ class RDoc::Store
268
268
  ##
269
269
  # Path to the ri data for +klass_name+
270
270
 
271
- def class_file klass_name
271
+ def class_file(klass_name)
272
272
  name = klass_name.split('::').last
273
273
  File.join class_path(klass_name), "cdesc-#{name}.ri"
274
274
  end
@@ -284,7 +284,7 @@ class RDoc::Store
284
284
  ##
285
285
  # Path where data for +klass_name+ will be stored (methods or class data)
286
286
 
287
- def class_path klass_name
287
+ def class_path(klass_name)
288
288
  File.join @path, *klass_name.split('::')
289
289
  end
290
290
 
@@ -299,7 +299,7 @@ class RDoc::Store
299
299
  # Removes empty items and ensures item in each collection are unique and
300
300
  # sorted
301
301
 
302
- def clean_cache_collection collection # :nodoc:
302
+ def clean_cache_collection(collection) # :nodoc:
303
303
  collection.each do |name, item|
304
304
  if item.empty? then
305
305
  collection.delete name
@@ -327,7 +327,7 @@ class RDoc::Store
327
327
  #
328
328
  # See also RDoc::Context#remove_from_documentation?
329
329
 
330
- def complete min_visibility
330
+ def complete(min_visibility)
331
331
  fix_basic_object_inheritance
332
332
 
333
333
  # cache included modules before they are removed from the documentation
@@ -374,7 +374,7 @@ class RDoc::Store
374
374
  ##
375
375
  # Finds the enclosure (namespace) for the given C +variable+.
376
376
 
377
- def find_c_enclosure variable
377
+ def find_c_enclosure(variable)
378
378
  @c_enclosure_classes.fetch variable do
379
379
  break unless name = @c_enclosure_names[variable]
380
380
 
@@ -399,14 +399,14 @@ class RDoc::Store
399
399
  ##
400
400
  # Finds the class with +name+ in all discovered classes
401
401
 
402
- def find_class_named name
402
+ def find_class_named(name)
403
403
  @classes_hash[name]
404
404
  end
405
405
 
406
406
  ##
407
407
  # Finds the class with +name+ starting in namespace +from+
408
408
 
409
- def find_class_named_from name, from
409
+ def find_class_named_from(name, from)
410
410
  from = find_class_named from unless RDoc::Context === from
411
411
 
412
412
  until RDoc::TopLevel === from do
@@ -424,7 +424,7 @@ class RDoc::Store
424
424
  ##
425
425
  # Finds the class or module with +name+
426
426
 
427
- def find_class_or_module name
427
+ def find_class_or_module(name)
428
428
  name = $' if name =~ /^::/
429
429
  @classes_hash[name] || @modules_hash[name]
430
430
  end
@@ -432,14 +432,14 @@ class RDoc::Store
432
432
  ##
433
433
  # Finds the file with +name+ in all discovered files
434
434
 
435
- def find_file_named name
435
+ def find_file_named(name)
436
436
  @files_hash[name]
437
437
  end
438
438
 
439
439
  ##
440
440
  # Finds the module with +name+ in all discovered modules
441
441
 
442
- def find_module_named name
442
+ def find_module_named(name)
443
443
  @modules_hash[name]
444
444
  end
445
445
 
@@ -447,7 +447,7 @@ class RDoc::Store
447
447
  # Returns the RDoc::TopLevel that is a text file and has the given
448
448
  # +file_name+
449
449
 
450
- def find_text_page file_name
450
+ def find_text_page(file_name)
451
451
  @text_files_hash.each_value.find do |file|
452
452
  file.full_name == file_name
453
453
  end
@@ -460,7 +460,7 @@ class RDoc::Store
460
460
  #--
461
461
  # TODO aliases should be registered by Context#add_module_alias
462
462
 
463
- def find_unique all_hash
463
+ def find_unique(all_hash)
464
464
  unique = []
465
465
 
466
466
  all_hash.each_pair do |full_name, cm|
@@ -603,7 +603,7 @@ class RDoc::Store
603
603
  ##
604
604
  # Loads ri data for +klass_name+ and hooks it up to this store.
605
605
 
606
- def load_class klass_name
606
+ def load_class(klass_name)
607
607
  obj = load_class_data klass_name
608
608
 
609
609
  obj.store = self
@@ -621,7 +621,7 @@ class RDoc::Store
621
621
  ##
622
622
  # Loads ri data for +klass_name+
623
623
 
624
- def load_class_data klass_name
624
+ def load_class_data(klass_name)
625
625
  file = class_file klass_name
626
626
 
627
627
  marshal_load(file)
@@ -634,7 +634,7 @@ class RDoc::Store
634
634
  ##
635
635
  # Loads ri data for +method_name+ in +klass_name+
636
636
 
637
- def load_method klass_name, method_name
637
+ def load_method(klass_name, method_name)
638
638
  file = method_file klass_name, method_name
639
639
 
640
640
  obj = marshal_load(file)
@@ -650,7 +650,7 @@ class RDoc::Store
650
650
  ##
651
651
  # Loads ri data for +page_name+
652
652
 
653
- def load_page page_name
653
+ def load_page(page_name)
654
654
  file = page_file page_name
655
655
 
656
656
  obj = marshal_load(file)
@@ -673,7 +673,7 @@ class RDoc::Store
673
673
  ##
674
674
  # Sets the main page for this RDoc store.
675
675
 
676
- def main= page
676
+ def main=(page)
677
677
  @cache[:main] = page
678
678
  end
679
679
 
@@ -681,7 +681,7 @@ class RDoc::Store
681
681
  # Converts the variable => ClassModule map +variables+ from a C parser into
682
682
  # a variable => class name map.
683
683
 
684
- def make_variable_map variables
684
+ def make_variable_map(variables)
685
685
  map = {}
686
686
 
687
687
  variables.each { |variable, class_module|
@@ -694,7 +694,7 @@ class RDoc::Store
694
694
  ##
695
695
  # Path to the ri data for +method_name+ in +klass_name+
696
696
 
697
- def method_file klass_name, method_name
697
+ def method_file(klass_name, method_name)
698
698
  method_name = method_name.split('::').last
699
699
  method_name =~ /#(.*)/
700
700
  method_type = $1 ? 'i' : 'c'
@@ -722,7 +722,7 @@ class RDoc::Store
722
722
  ##
723
723
  # Returns the RDoc::TopLevel that is a text file and has the given +name+
724
724
 
725
- def page name
725
+ def page(name)
726
726
  @text_files_hash.each_value.find do |file|
727
727
  file.page_name == name or file.base_name == name
728
728
  end
@@ -731,7 +731,7 @@ class RDoc::Store
731
731
  ##
732
732
  # Path to the ri data for +page_name+
733
733
 
734
- def page_file page_name
734
+ def page_file(page_name)
735
735
  file_name = File.basename(page_name).gsub('.', '_')
736
736
 
737
737
  File.join @path, File.dirname(page_name), "page-#{file_name}.ri"
@@ -742,7 +742,7 @@ class RDoc::Store
742
742
  #
743
743
  # See RDoc::Context#remove_from_documentation?
744
744
 
745
- def remove_nodoc all_hash
745
+ def remove_nodoc(all_hash)
746
746
  all_hash.keys.each do |name|
747
747
  context = all_hash[name]
748
748
  all_hash.delete(name) if context.remove_from_documentation?
@@ -804,7 +804,7 @@ class RDoc::Store
804
804
  ##
805
805
  # Writes the ri data for +klass+ (or module)
806
806
 
807
- def save_class klass
807
+ def save_class(klass)
808
808
  full_name = klass.full_name
809
809
 
810
810
  FileUtils.mkdir_p class_path(full_name) unless @dry_run
@@ -878,7 +878,7 @@ class RDoc::Store
878
878
  ##
879
879
  # Writes the ri data for +method+ on +klass+
880
880
 
881
- def save_method klass, method
881
+ def save_method(klass, method)
882
882
  full_name = klass.full_name
883
883
 
884
884
  FileUtils.mkdir_p class_path(full_name) unless @dry_run
@@ -901,7 +901,7 @@ class RDoc::Store
901
901
  ##
902
902
  # Writes the ri data for +page+
903
903
 
904
- def save_page page
904
+ def save_page(page)
905
905
  return unless page.text?
906
906
 
907
907
  path = page_file page.full_name
@@ -948,7 +948,7 @@ class RDoc::Store
948
948
  ##
949
949
  # Sets the title page for this RDoc store.
950
950
 
951
- def title= title
951
+ def title=(title)
952
952
  @cache[:title] = title
953
953
  end
954
954
 
data/lib/rdoc/task.rb CHANGED
@@ -154,7 +154,7 @@ class RDoc::Task < Rake::TaskLib
154
154
  # Create an RDoc task with the given name. See the RDoc::Task class overview
155
155
  # for documentation.
156
156
 
157
- def initialize name = :rdoc # :yield: self
157
+ def initialize(name = :rdoc) # :yield: self
158
158
  defaults
159
159
 
160
160
  check_names name
@@ -170,7 +170,7 @@ class RDoc::Task < Rake::TaskLib
170
170
  # Ensures that +names+ only includes names for the :rdoc, :clobber_rdoc and
171
171
  # :rerdoc. If other names are given an ArgumentError is raised.
172
172
 
173
- def check_names names
173
+ def check_names(names)
174
174
  return unless Hash === names
175
175
 
176
176
  invalid_options =
data/lib/rdoc/text.rb CHANGED
@@ -52,7 +52,7 @@ module RDoc::Text
52
52
  ##
53
53
  # Transcodes +character+ to +encoding+ with a +fallback+ character.
54
54
 
55
- def self.encode_fallback character, encoding, fallback
55
+ def self.encode_fallback(character, encoding, fallback)
56
56
  character.encode(encoding, :fallback => { character => fallback },
57
57
  :undef => :replace, :replace => fallback)
58
58
  end
@@ -60,7 +60,7 @@ module RDoc::Text
60
60
  ##
61
61
  # Expands tab characters in +text+ to eight spaces
62
62
 
63
- def expand_tabs text
63
+ def expand_tabs(text)
64
64
  expanded = []
65
65
 
66
66
  text.each_line do |line|
@@ -79,7 +79,7 @@ module RDoc::Text
79
79
  ##
80
80
  # Flush +text+ left based on the shortest line
81
81
 
82
- def flush_left text
82
+ def flush_left(text)
83
83
  indent = 9999
84
84
 
85
85
  text.each_line do |line|
@@ -98,7 +98,7 @@ module RDoc::Text
98
98
  #
99
99
  # Requires the including class to implement #formatter
100
100
 
101
- def markup text
101
+ def markup(text)
102
102
  if @store.options
103
103
  locale = @store.options.locale
104
104
  else
@@ -114,7 +114,7 @@ module RDoc::Text
114
114
  ##
115
115
  # Strips hashes, expands tabs then flushes +text+ to the left
116
116
 
117
- def normalize_comment text
117
+ def normalize_comment(text)
118
118
  return text if text.empty?
119
119
 
120
120
  case language
@@ -132,7 +132,7 @@ module RDoc::Text
132
132
  ##
133
133
  # Normalizes +text+ then builds a RDoc::Markup::Document from it
134
134
 
135
- def parse text, format = 'rdoc'
135
+ def parse(text, format = 'rdoc')
136
136
  return text if RDoc::Markup::Document === text
137
137
  return text.parse if RDoc::Comment === text
138
138
 
@@ -146,7 +146,7 @@ module RDoc::Text
146
146
  ##
147
147
  # The first +limit+ characters of +text+ as HTML
148
148
 
149
- def snippet text, limit = 100
149
+ def snippet(text, limit = 100)
150
150
  document = parse text
151
151
 
152
152
  RDoc::Markup::ToHtmlSnippet.new(options, limit).convert document
@@ -155,7 +155,7 @@ module RDoc::Text
155
155
  ##
156
156
  # Strips leading # characters from +text+
157
157
 
158
- def strip_hashes text
158
+ def strip_hashes(text)
159
159
  return text if text =~ /^(?>\s*)[^\#]/
160
160
 
161
161
  empty = ''
@@ -167,14 +167,14 @@ module RDoc::Text
167
167
  ##
168
168
  # Strips leading and trailing \n characters from +text+
169
169
 
170
- def strip_newlines text
170
+ def strip_newlines(text)
171
171
  text.gsub(/\A\n*(.*?)\n*\z/m) do $1 end # block preserves String encoding
172
172
  end
173
173
 
174
174
  ##
175
175
  # Strips /* */ style comments
176
176
 
177
- def strip_stars text
177
+ def strip_stars(text)
178
178
  return text unless text =~ %r%/\*.*\*/%m
179
179
 
180
180
  encoding = text.encoding
@@ -197,7 +197,7 @@ module RDoc::Text
197
197
  # Converts ampersand, dashes, ellipsis, quotes, copyright and registered
198
198
  # trademark symbols in +text+ to properly encoded characters.
199
199
 
200
- def to_html text
200
+ def to_html(text)
201
201
  html = (''.encode text.encoding).dup
202
202
 
203
203
  encoded = RDoc::Text::TO_HTML_CHARACTERS[text.encoding]
@@ -13,7 +13,7 @@ module RDoc::TokenStream
13
13
  # <tt><span></tt> elements. Some tokens types are wrapped in spans
14
14
  # with the given class names. Other token types are not wrapped in spans.
15
15
 
16
- def self.to_html token_stream
16
+ def self.to_html(token_stream)
17
17
  starting_title = false
18
18
 
19
19
  token_stream.map do |t|
data/lib/rdoc/tom_doc.rb CHANGED
@@ -75,7 +75,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
75
75
  #
76
76
  # Returns an RDoc::Markup::Document representing the TomDoc format.
77
77
 
78
- def self.parse text
78
+ def self.parse(text)
79
79
  parser = new
80
80
 
81
81
  parser.tokenize text
@@ -91,7 +91,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
91
91
  #
92
92
  # Returns a String containing the signature and nil if not
93
93
 
94
- def self.signature comment
94
+ def self.signature(comment)
95
95
  return unless comment.tomdoc?
96
96
 
97
97
  document = comment.parse
@@ -134,7 +134,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
134
134
  #
135
135
  # Returns an RDoc::Markup::Heading
136
136
 
137
- def build_heading level
137
+ def build_heading(level)
138
138
  heading = super
139
139
 
140
140
  @section = heading.text
@@ -150,7 +150,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
150
150
  #
151
151
  # Returns an RDoc::Markup::Verbatim
152
152
 
153
- def build_verbatim margin
153
+ def build_verbatim(margin)
154
154
  verbatim = super
155
155
 
156
156
  verbatim.format = :ruby if @section == 'Examples'
@@ -164,7 +164,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
164
164
  #
165
165
  # Returns an RDoc::Markup::Paragraph.
166
166
 
167
- def build_paragraph margin
167
+ def build_paragraph(margin)
168
168
  p :paragraph_start => margin if @debug
169
169
 
170
170
  paragraph = RDoc::Markup::Paragraph.new
@@ -204,7 +204,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
204
204
  ##
205
205
  # Detects a section change to "Returns" and adds a heading
206
206
 
207
- def parse_text parent, indent # :nodoc:
207
+ def parse_text(parent, indent) # :nodoc:
208
208
  paragraph = build_paragraph indent
209
209
 
210
210
  if false == @seen_returns and 'Returns' == @section then
@@ -222,7 +222,7 @@ class RDoc::TomDoc < RDoc::Markup::Parser
222
222
  #
223
223
  # Returns self.
224
224
 
225
- def tokenize text
225
+ def tokenize(text)
226
226
  text = text.sub(/\A(Public|Internal|Deprecated):\s+/, '')
227
227
 
228
228
  setup_scanner text
data/lib/rdoc/version.rb CHANGED
@@ -5,6 +5,6 @@ module RDoc
5
5
  ##
6
6
  # RDoc version you are using
7
7
 
8
- VERSION = '6.13.0'
8
+ VERSION = '6.14.0'
9
9
 
10
10
  end
data/man/ri.1 CHANGED
@@ -36,6 +36,8 @@ can be:
36
36
  .It Class::method | Class#method | Class.method | method
37
37
  .Pp
38
38
  .It gem_name: | gem_name:README | gem_name:History
39
+ .Pp
40
+ .It ruby: | ruby:NEWS | ruby:globals
39
41
  .El
40
42
  .Pp
41
43
  All class names may be abbreviated to their minimum unambiguous form.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.13.0
4
+ version: 6.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -13,7 +13,7 @@ authors:
13
13
  - ITOYANAGI Sakura
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2025-03-23 00:00:00.000000000 Z
16
+ date: 2025-05-19 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: psych
@@ -29,6 +29,20 @@ dependencies:
29
29
  - - ">="
30
30
  - !ruby/object:Gem::Version
31
31
  version: 4.0.0
32
+ - !ruby/object:Gem::Dependency
33
+ name: erb
34
+ requirement: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
32
46
  description: |
33
47
  RDoc produces HTML and command-line documentation for Ruby projects.
34
48
  RDoc includes the +rdoc+ and +ri+ tools for generating and displaying documentation from the command-line.
@@ -267,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
267
281
  - !ruby/object:Gem::Version
268
282
  version: '2.2'
269
283
  requirements: []
270
- rubygems_version: 3.6.2
284
+ rubygems_version: 3.6.7
271
285
  specification_version: 4
272
286
  summary: RDoc produces HTML and command-line documentation for Ruby projects
273
287
  test_files: []