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
@@ -21,7 +21,7 @@ class RDoc::Markup::Formatter
21
21
  ##
22
22
  # Converts a target url to one that is relative to a given path
23
23
 
24
- def self.gen_relative_url path, target
24
+ def self.gen_relative_url(path, target)
25
25
  from = File.dirname path
26
26
  to, to_file = File.split target
27
27
 
@@ -45,7 +45,7 @@ class RDoc::Markup::Formatter
45
45
  ##
46
46
  # Creates a new Formatter
47
47
 
48
- def initialize options, markup = nil
48
+ def initialize(options, markup = nil)
49
49
  @options = options
50
50
 
51
51
  @markup = markup || RDoc::Markup.new
@@ -66,7 +66,7 @@ class RDoc::Markup::Formatter
66
66
  ##
67
67
  # Adds +document+ to the output
68
68
 
69
- def accept_document document
69
+ def accept_document(document)
70
70
  document.parts.each do |item|
71
71
  case item
72
72
  when RDoc::Markup::Document then # HACK
@@ -117,7 +117,7 @@ class RDoc::Markup::Formatter
117
117
  ##
118
118
  # Marks up +content+
119
119
 
120
- def convert content
120
+ def convert(content)
121
121
  @markup.convert content, self
122
122
  end
123
123
 
@@ -147,7 +147,7 @@ class RDoc::Markup::Formatter
147
147
  ##
148
148
  # Converts added regexp handlings. See RDoc::Markup#add_regexp_handling
149
149
 
150
- def convert_regexp_handling target
150
+ def convert_regexp_handling(target)
151
151
  return target.text if in_tt?
152
152
 
153
153
  handled = false
@@ -173,7 +173,7 @@ class RDoc::Markup::Formatter
173
173
  ##
174
174
  # Converts a string to be fancier if desired
175
175
 
176
- def convert_string string
176
+ def convert_string(string)
177
177
  string
178
178
  end
179
179
 
@@ -195,7 +195,7 @@ class RDoc::Markup::Formatter
195
195
  @in_tt > 0
196
196
  end
197
197
 
198
- def tt_tag? attr_mask, reverse = false
198
+ def tt_tag?(attr_mask, reverse = false)
199
199
  each_attr_tag(attr_mask, reverse) do |tag|
200
200
  return true if tt? tag
201
201
  end
@@ -205,7 +205,7 @@ class RDoc::Markup::Formatter
205
205
  ##
206
206
  # Turns on tags for +item+ on +res+
207
207
 
208
- def on_tags res, item
208
+ def on_tags(res, item)
209
209
  each_attr_tag(item.turn_on) do |tag|
210
210
  res << annotate(tag.on)
211
211
  @in_tt += 1 if tt? tag
@@ -215,14 +215,14 @@ class RDoc::Markup::Formatter
215
215
  ##
216
216
  # Turns off tags for +item+ on +res+
217
217
 
218
- def off_tags res, item
218
+ def off_tags(res, item)
219
219
  each_attr_tag(item.turn_off, true) do |tag|
220
220
  @in_tt -= 1 if tt? tag
221
221
  res << annotate(tag.off)
222
222
  end
223
223
  end
224
224
 
225
- def each_attr_tag attr_mask, reverse = false
225
+ def each_attr_tag(attr_mask, reverse = false)
226
226
  return if attr_mask.zero?
227
227
 
228
228
  @attr_tags.public_send(reverse ? :reverse_each : :each) do |tag|
@@ -235,7 +235,7 @@ class RDoc::Markup::Formatter
235
235
  ##
236
236
  # Extracts and a scheme, url and an anchor id from +url+ and returns them.
237
237
 
238
- def parse_url url
238
+ def parse_url(url)
239
239
  case url
240
240
  when /^rdoc-label:([^:]*)(?::(.*))?/ then
241
241
  scheme = 'link'
@@ -265,7 +265,7 @@ class RDoc::Markup::Formatter
265
265
  ##
266
266
  # Is +tag+ a tt tag?
267
267
 
268
- def tt? tag
268
+ def tt?(tag)
269
269
  tag.bit == @tt_bit
270
270
  end
271
271
 
@@ -16,15 +16,15 @@ class RDoc::Markup::HardBreak
16
16
  ##
17
17
  # Calls #accept_hard_break on +visitor+
18
18
 
19
- def accept visitor
19
+ def accept(visitor)
20
20
  visitor.accept_hard_break self
21
21
  end
22
22
 
23
- def == other # :nodoc:
23
+ def ==(other) # :nodoc:
24
24
  self.class === other
25
25
  end
26
26
 
27
- def pretty_print q # :nodoc:
27
+ def pretty_print(q) # :nodoc:
28
28
  q.text "[break]"
29
29
  end
30
30
 
@@ -27,7 +27,7 @@ RDoc::Markup::Heading =
27
27
 
28
28
  @to_html = RDoc::Markup::ToHtml.new nil
29
29
 
30
- def @to_html.handle_regexp_CROSSREF target
30
+ def @to_html.handle_regexp_CROSSREF(target)
31
31
  target.text.sub(/^\\/, '')
32
32
  end
33
33
 
@@ -37,7 +37,7 @@ RDoc::Markup::Heading =
37
37
  ##
38
38
  # Calls #accept_heading on +visitor+
39
39
 
40
- def accept visitor
40
+ def accept(visitor)
41
41
  visitor.accept_heading self
42
42
  end
43
43
 
@@ -52,7 +52,7 @@ RDoc::Markup::Heading =
52
52
  # Creates a fully-qualified label which will include the label from
53
53
  # +context+. This helps keep ids unique in HTML.
54
54
 
55
- def label context = nil
55
+ def label(context = nil)
56
56
  label = aref
57
57
 
58
58
  label = [context.aref, label].compact.join '-' if
@@ -75,7 +75,7 @@ RDoc::Markup::Heading =
75
75
  self.class.to_html.to_html(text)
76
76
  end
77
77
 
78
- def pretty_print q # :nodoc:
78
+ def pretty_print(q) # :nodoc:
79
79
  q.group 2, "[head: #{level} ", ']' do
80
80
  q.pp text
81
81
  end
@@ -20,17 +20,17 @@ class RDoc::Markup::Include
20
20
  ##
21
21
  # Creates a new include that will import +file+ from +include_path+
22
22
 
23
- def initialize file, include_path
23
+ def initialize(file, include_path)
24
24
  @file = file
25
25
  @include_path = include_path
26
26
  end
27
27
 
28
- def == other # :nodoc:
28
+ def ==(other) # :nodoc:
29
29
  self.class === other and
30
30
  @file == other.file and @include_path == other.include_path
31
31
  end
32
32
 
33
- def pretty_print q # :nodoc:
33
+ def pretty_print(q) # :nodoc:
34
34
  q.group 2, '[incl ', ']' do
35
35
  q.text file
36
36
  q.breakable
@@ -19,14 +19,14 @@ class RDoc::Markup::IndentedParagraph < RDoc::Markup::Raw
19
19
  super(*parts)
20
20
  end
21
21
 
22
- def == other # :nodoc:
22
+ def ==(other) # :nodoc:
23
23
  super and indent == other.indent
24
24
  end
25
25
 
26
26
  ##
27
27
  # Calls #accept_indented_paragraph on +visitor+
28
28
 
29
- def accept visitor
29
+ def accept(visitor)
30
30
  visitor.accept_indented_paragraph self
31
31
  end
32
32
 
@@ -34,7 +34,7 @@ class RDoc::Markup::IndentedParagraph < RDoc::Markup::Raw
34
34
  # Joins the raw paragraph text and converts inline HardBreaks to the
35
35
  # +hard_break+ text followed by the indent.
36
36
 
37
- def text hard_break = nil
37
+ def text(hard_break = nil)
38
38
  @parts.map do |part|
39
39
  if RDoc::Markup::HardBreak === part then
40
40
  '%1$s%3$*2$s' % [hard_break, @indent, ' '] if hard_break
@@ -46,11 +46,11 @@ class RDoc::Markup::List
46
46
  ##
47
47
  # Appends +item+ to the list
48
48
 
49
- def << item
49
+ def <<(item)
50
50
  @items << item
51
51
  end
52
52
 
53
- def == other # :nodoc:
53
+ def ==(other) # :nodoc:
54
54
  self.class == other.class and
55
55
  @type == other.type and
56
56
  @items == other.items
@@ -59,7 +59,7 @@ class RDoc::Markup::List
59
59
  ##
60
60
  # Runs this list and all its #items through +visitor+
61
61
 
62
- def accept visitor
62
+ def accept(visitor)
63
63
  visitor.accept_list_start self
64
64
 
65
65
  @items.each do |item|
@@ -83,7 +83,7 @@ class RDoc::Markup::List
83
83
  @items.last
84
84
  end
85
85
 
86
- def pretty_print q # :nodoc:
86
+ def pretty_print(q) # :nodoc:
87
87
  q.group 2, "[list: #{@type} ", ']' do
88
88
  q.seplist @items do |item|
89
89
  q.pp item
@@ -33,11 +33,11 @@ class RDoc::Markup::ListItem
33
33
  ##
34
34
  # Appends +part+ to the ListItem
35
35
 
36
- def << part
36
+ def <<(part)
37
37
  @parts << part
38
38
  end
39
39
 
40
- def == other # :nodoc:
40
+ def ==(other) # :nodoc:
41
41
  self.class == other.class and
42
42
  @label == other.label and
43
43
  @parts == other.parts
@@ -46,7 +46,7 @@ class RDoc::Markup::ListItem
46
46
  ##
47
47
  # Runs this list item and all its #parts through +visitor+
48
48
 
49
- def accept visitor
49
+ def accept(visitor)
50
50
  visitor.accept_list_item_start self
51
51
 
52
52
  @parts.each do |part|
@@ -70,7 +70,7 @@ class RDoc::Markup::ListItem
70
70
  @parts.length
71
71
  end
72
72
 
73
- def pretty_print q # :nodoc:
73
+ def pretty_print(q) # :nodoc:
74
74
  q.group 2, '[item: ', ']' do
75
75
  case @label
76
76
  when Array then
@@ -7,7 +7,7 @@ class RDoc::Markup::Paragraph < RDoc::Markup::Raw
7
7
  ##
8
8
  # Calls #accept_paragraph on +visitor+
9
9
 
10
- def accept visitor
10
+ def accept(visitor)
11
11
  visitor.accept_paragraph self
12
12
  end
13
13
 
@@ -15,7 +15,7 @@ class RDoc::Markup::Paragraph < RDoc::Markup::Raw
15
15
  # Joins the raw paragraph text and converts inline HardBreaks to the
16
16
  # +hard_break+ text.
17
17
 
18
- def text hard_break = ''
18
+ def text(hard_break = '')
19
19
  @parts.map do |part|
20
20
  if RDoc::Markup::HardBreak === part then
21
21
  hard_break
@@ -57,7 +57,7 @@ class RDoc::Markup::Parser
57
57
  #
58
58
  # Use RDoc::Markup#parse instead of this method.
59
59
 
60
- def self.parse str
60
+ def self.parse(str)
61
61
  parser = new
62
62
  parser.tokenize str
63
63
  doc = RDoc::Markup::Document.new
@@ -67,7 +67,7 @@ class RDoc::Markup::Parser
67
67
  ##
68
68
  # Returns a token stream for +str+, for testing
69
69
 
70
- def self.tokenize str
70
+ def self.tokenize(str)
71
71
  parser = new
72
72
  parser.tokenize str
73
73
  parser.tokens
@@ -87,7 +87,7 @@ class RDoc::Markup::Parser
87
87
  ##
88
88
  # Builds a Heading of +level+
89
89
 
90
- def build_heading level
90
+ def build_heading(level)
91
91
  type, text, = get
92
92
 
93
93
  text = case type
@@ -105,7 +105,7 @@ class RDoc::Markup::Parser
105
105
  ##
106
106
  # Builds a List flush to +margin+
107
107
 
108
- def build_list margin
108
+ def build_list(margin)
109
109
  p :list_start => margin if @debug
110
110
 
111
111
  list = RDoc::Markup::List.new
@@ -205,7 +205,7 @@ class RDoc::Markup::Parser
205
205
  ##
206
206
  # Builds a Paragraph that is flush to +margin+
207
207
 
208
- def build_paragraph margin
208
+ def build_paragraph(margin)
209
209
  p :paragraph_start => margin if @debug
210
210
 
211
211
  paragraph = RDoc::Markup::Paragraph.new
@@ -240,7 +240,7 @@ class RDoc::Markup::Parser
240
240
  # terminated by a newline. Blank lines always consist of a single newline
241
241
  # character, and there is never a single newline at the end of the verbatim.
242
242
 
243
- def build_verbatim margin
243
+ def build_verbatim(margin)
244
244
  p :verbatim_begin => margin if @debug
245
245
  verbatim = RDoc::Markup::Verbatim.new
246
246
 
@@ -339,7 +339,7 @@ class RDoc::Markup::Parser
339
339
  #
340
340
  # Returns +parent+.
341
341
 
342
- def parse parent, indent = 0
342
+ def parse(parent, indent = 0)
343
343
  p :parse_start => indent if @debug
344
344
 
345
345
  until @tokens.empty? do
@@ -403,7 +403,7 @@ class RDoc::Markup::Parser
403
403
  ##
404
404
  # Small hook that is overridden by RDoc::TomDoc
405
405
 
406
- def parse_text parent, indent # :nodoc:
406
+ def parse_text(parent, indent) # :nodoc:
407
407
  parent << build_paragraph(indent)
408
408
  end
409
409
 
@@ -465,7 +465,7 @@ class RDoc::Markup::Parser
465
465
  ##
466
466
  # Creates the StringScanner
467
467
 
468
- def setup_scanner input
468
+ def setup_scanner(input)
469
469
  @s = MyStringScanner.new input
470
470
  end
471
471
 
@@ -474,7 +474,7 @@ class RDoc::Markup::Parser
474
474
  #
475
475
  # Optionally raises an error if the next token is not of the expected type.
476
476
 
477
- def skip token_type, error = true
477
+ def skip(token_type, error = true)
478
478
  type, = get
479
479
  return unless type # end of stream
480
480
  return @current_token if token_type == type
@@ -485,7 +485,7 @@ class RDoc::Markup::Parser
485
485
  ##
486
486
  # Turns text +input+ into a stream of tokens
487
487
 
488
- def tokenize input
488
+ def tokenize(input)
489
489
  setup_scanner input
490
490
 
491
491
  until @s.eos? do
@@ -27,7 +27,7 @@ class RDoc::Markup::PreProcess
27
27
  # with the result RDoc::Comment (or text String) and the code object for the
28
28
  # comment (if any).
29
29
 
30
- def self.post_process &block
30
+ def self.post_process(&block)
31
31
  @post_processors << block
32
32
  end
33
33
 
@@ -50,7 +50,7 @@ class RDoc::Markup::PreProcess
50
50
  # # replace text, etc.
51
51
  # end
52
52
 
53
- def self.register directive, &block
53
+ def self.register(directive, &block)
54
54
  @registered[directive] = block
55
55
  end
56
56
 
@@ -96,7 +96,7 @@ class RDoc::Markup::PreProcess
96
96
  # directive's parameter is set as metadata on the +code_object+. See
97
97
  # RDoc::CodeObject#metadata for details.
98
98
 
99
- def handle text, code_object = nil, &block
99
+ def handle(text, code_object = nil, &block)
100
100
  first_line = 1
101
101
  if RDoc::Comment === text then
102
102
  comment = text
@@ -150,8 +150,8 @@ class RDoc::Markup::PreProcess
150
150
  #--
151
151
  # When 1.8.7 support is ditched prefix can be defaulted to ''
152
152
 
153
- def handle_directive prefix, directive, param, code_object = nil,
154
- encoding = nil, line = nil
153
+ def handle_directive(prefix, directive, param, code_object = nil,
154
+ encoding = nil, line = nil)
155
155
  blankline = "#{prefix.strip}\n"
156
156
  directive = directive.downcase
157
157
 
@@ -279,7 +279,7 @@ class RDoc::Markup::PreProcess
279
279
  # TODO shift left the whole file content in that case
280
280
  # TODO comment stop/start #-- and #++ in included file must be processed here
281
281
 
282
- def include_file name, indent, encoding
282
+ def include_file(name, indent, encoding)
283
283
  full_name = find_include_file name
284
284
 
285
285
  unless full_name then
@@ -20,29 +20,29 @@ class RDoc::Markup::Raw
20
20
  ##
21
21
  # Appends +text+
22
22
 
23
- def << text
23
+ def <<(text)
24
24
  @parts << text
25
25
  end
26
26
 
27
- def == other # :nodoc:
27
+ def ==(other) # :nodoc:
28
28
  self.class == other.class and @parts == other.parts
29
29
  end
30
30
 
31
31
  ##
32
32
  # Calls #accept_raw+ on +visitor+
33
33
 
34
- def accept visitor
34
+ def accept(visitor)
35
35
  visitor.accept_raw self
36
36
  end
37
37
 
38
38
  ##
39
39
  # Appends +other+'s parts
40
40
 
41
- def merge other
41
+ def merge(other)
42
42
  @parts.concat other.parts
43
43
  end
44
44
 
45
- def pretty_print q # :nodoc:
45
+ def pretty_print(q) # :nodoc:
46
46
  self.class.name =~ /.*::(\w{1,4})/i
47
47
 
48
48
  q.group 2, "[#{$1.downcase}: ", ']' do
@@ -7,11 +7,11 @@ class RDoc::Markup::Rule < Struct.new :weight
7
7
  ##
8
8
  # Calls #accept_rule on +visitor+
9
9
 
10
- def accept visitor
10
+ def accept(visitor)
11
11
  visitor.accept_rule self
12
12
  end
13
13
 
14
- def pretty_print q # :nodoc:
14
+ def pretty_print(q) # :nodoc:
15
15
  q.group 2, '[rule:', ']' do
16
16
  q.pp weight
17
17
  end
@@ -13,23 +13,23 @@ class RDoc::Markup::Table
13
13
  attr_accessor :body
14
14
 
15
15
  # Creates new instance
16
- def initialize header, align, body
16
+ def initialize(header, align, body)
17
17
  @header, @align, @body = header, align, body
18
18
  end
19
19
 
20
20
  # :stopdoc:
21
- def == other
21
+ def ==(other)
22
22
  self.class == other.class and
23
23
  @header == other.header and
24
24
  @align == other.align and
25
25
  @body == other.body
26
26
  end
27
27
 
28
- def accept visitor
28
+ def accept(visitor)
29
29
  visitor.accept_table @header, @body, @align
30
30
  end
31
31
 
32
- def pretty_print q
32
+ def pretty_print(q)
33
33
  q.group 2, '[Table: ', ']' do
34
34
  q.group 2, '[Head: ', ']' do
35
35
  q.seplist @header.zip(@align) do |text, align|
@@ -7,7 +7,7 @@ class RDoc::Markup::ToAnsi < RDoc::Markup::ToRdoc
7
7
  ##
8
8
  # Creates a new ToAnsi visitor that is ready to output vibrant ANSI color!
9
9
 
10
- def initialize markup = nil
10
+ def initialize(markup = nil)
11
11
  super
12
12
 
13
13
  @headings.clear
@@ -28,7 +28,7 @@ class RDoc::Markup::ToAnsi < RDoc::Markup::ToRdoc
28
28
  ##
29
29
  # Overrides indent width to ensure output lines up correctly.
30
30
 
31
- def accept_list_item_end list_item
31
+ def accept_list_item_end(list_item)
32
32
  width = case @list_type.last
33
33
  when :BULLET then
34
34
  2
@@ -52,7 +52,7 @@ class RDoc::Markup::ToAnsi < RDoc::Markup::ToRdoc
52
52
  ##
53
53
  # Adds coloring to note and label list items
54
54
 
55
- def accept_list_item_start list_item
55
+ def accept_list_item_start(list_item)
56
56
  bullet = case @list_type.last
57
57
  when :BULLET then
58
58
  '*'
@@ -10,7 +10,7 @@ class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
10
10
  ##
11
11
  # Returns a new ToBs that is ready for hot backspace action!
12
12
 
13
- def initialize markup = nil
13
+ def initialize(markup = nil)
14
14
  super
15
15
 
16
16
  @in_b = false
@@ -30,7 +30,7 @@ class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
30
30
  ##
31
31
  # Makes heading text bold.
32
32
 
33
- def accept_heading heading
33
+ def accept_heading(heading)
34
34
  use_prefix or @res << ' ' * @indent
35
35
  @res << @headings[heading.level][0]
36
36
  @in_b = true
@@ -43,7 +43,7 @@ class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
43
43
  ##
44
44
  # Prepares the visitor for consuming +list_item+
45
45
 
46
- def accept_list_item_start list_item
46
+ def accept_list_item_start(list_item)
47
47
  type = @list_type.last
48
48
 
49
49
  case type
@@ -68,7 +68,7 @@ class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
68
68
  ##
69
69
  # Turns on or off regexp handling for +convert_string+
70
70
 
71
- def annotate tag
71
+ def annotate(tag)
72
72
  case tag
73
73
  when '+b' then @in_b = true
74
74
  when '-b' then @in_b = false
@@ -81,14 +81,14 @@ class RDoc::Markup::ToBs < RDoc::Markup::ToRdoc
81
81
  ##
82
82
  # Calls convert_string on the result of convert_regexp_handling
83
83
 
84
- def convert_regexp_handling target
84
+ def convert_regexp_handling(target)
85
85
  convert_string super
86
86
  end
87
87
 
88
88
  ##
89
89
  # Adds bold or underline mixed with backspaces
90
90
 
91
- def convert_string string
91
+ def convert_string(string)
92
92
  return string unless @in_b or @in_em
93
93
  chars = if @in_b then
94
94
  string.chars.map do |char| "#{char}\b#{char}" end