rdoc 7.2.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 (150) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +4 -7
  3. data/LICENSE.rdoc +4 -0
  4. data/README.md +43 -2
  5. data/RI.md +75 -75
  6. data/doc/markup_reference/markdown.md +104 -3
  7. data/exe/rdoc +2 -2
  8. data/lib/rdoc/code_object/alias.rb +70 -74
  9. data/lib/rdoc/code_object/any_method.rb +305 -298
  10. data/lib/rdoc/code_object/attr.rb +150 -143
  11. data/lib/rdoc/code_object/class_module.rb +801 -765
  12. data/lib/rdoc/code_object/constant.rb +178 -150
  13. data/lib/rdoc/code_object/context/section.rb +133 -160
  14. data/lib/rdoc/code_object/context.rb +925 -952
  15. data/lib/rdoc/code_object/extend.rb +7 -5
  16. data/lib/rdoc/code_object/include.rb +7 -5
  17. data/lib/rdoc/code_object/method_attr.rb +325 -324
  18. data/lib/rdoc/code_object/mixin.rb +97 -95
  19. data/lib/rdoc/code_object/normal_class.rb +77 -78
  20. data/lib/rdoc/code_object/normal_module.rb +61 -59
  21. data/lib/rdoc/code_object/require.rb +23 -39
  22. data/lib/rdoc/code_object/single_class.rb +21 -19
  23. data/lib/rdoc/code_object/top_level.rb +212 -213
  24. data/lib/rdoc/code_object.rb +305 -305
  25. data/lib/rdoc/comment.rb +274 -337
  26. data/lib/rdoc/cross_reference.rb +194 -212
  27. data/lib/rdoc/encoding.rb +105 -103
  28. data/lib/rdoc/erb_partial.rb +13 -11
  29. data/lib/rdoc/erbio.rb +29 -27
  30. data/lib/rdoc/generator/aliki.rb +165 -140
  31. data/lib/rdoc/generator/darkfish.rb +647 -631
  32. data/lib/rdoc/generator/json_index.rb +233 -229
  33. data/lib/rdoc/generator/markup.rb +165 -122
  34. data/lib/rdoc/generator/pot/message_extractor.rb +57 -51
  35. data/lib/rdoc/generator/pot/po.rb +52 -51
  36. data/lib/rdoc/generator/pot/po_entry.rb +138 -132
  37. data/lib/rdoc/generator/pot.rb +85 -81
  38. data/lib/rdoc/generator/ri.rb +23 -19
  39. data/lib/rdoc/generator/template/aliki/DESIGN.md +538 -0
  40. data/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +1 -1
  41. data/lib/rdoc/generator/template/aliki/_footer.rhtml +1 -1
  42. data/lib/rdoc/generator/template/aliki/_head.rhtml +11 -11
  43. data/lib/rdoc/generator/template/aliki/_header.rhtml +29 -44
  44. data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +8 -6
  45. data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +8 -6
  46. data/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +1 -1
  47. data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +2 -2
  48. data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +4 -4
  49. data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +1 -1
  50. data/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +1 -1
  51. data/lib/rdoc/generator/template/aliki/class.rhtml +56 -46
  52. data/lib/rdoc/generator/template/aliki/css/rdoc.css +538 -283
  53. data/lib/rdoc/generator/template/aliki/index.rhtml +1 -1
  54. data/lib/rdoc/generator/template/aliki/js/aliki.js +80 -102
  55. data/lib/rdoc/generator/template/aliki/page.rhtml +1 -1
  56. data/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +1 -1
  57. data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +2 -2
  58. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +1 -1
  59. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +8 -6
  60. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +8 -6
  61. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +1 -1
  62. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +1 -1
  63. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +1 -1
  64. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +5 -5
  65. data/lib/rdoc/generator/template/darkfish/class.rhtml +18 -21
  66. data/lib/rdoc/generator/template/darkfish/css/rdoc.css +0 -1
  67. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +3 -3
  68. data/lib/rdoc/generator.rb +48 -46
  69. data/lib/rdoc/i18n/locale.rb +99 -95
  70. data/lib/rdoc/i18n/text.rb +109 -105
  71. data/lib/rdoc/i18n.rb +7 -5
  72. data/lib/rdoc/markdown/byte_runtime.rb +80 -0
  73. data/lib/rdoc/markdown.kpeg +30 -21
  74. data/lib/rdoc/markdown.rb +329 -151
  75. data/lib/rdoc/markup/block_quote.rb +12 -8
  76. data/lib/rdoc/markup/document.rb +127 -123
  77. data/lib/rdoc/markup/formatter.rb +215 -221
  78. data/lib/rdoc/markup/heading.rb +1 -4
  79. data/lib/rdoc/markup/include.rb +33 -29
  80. data/lib/rdoc/markup/indented_paragraph.rb +37 -33
  81. data/lib/rdoc/markup/inline_parser.rb +281 -277
  82. data/lib/rdoc/markup/list.rb +80 -88
  83. data/lib/rdoc/markup/list_item.rb +73 -85
  84. data/lib/rdoc/markup/paragraph.rb +23 -19
  85. data/lib/rdoc/markup/parser.rb +501 -497
  86. data/lib/rdoc/markup/pre_process.rb +284 -305
  87. data/lib/rdoc/markup/raw.rb +2 -2
  88. data/lib/rdoc/markup/rule.rb +16 -12
  89. data/lib/rdoc/markup/to_ansi.rb +143 -139
  90. data/lib/rdoc/markup/to_bs.rb +72 -68
  91. data/lib/rdoc/markup/to_html.rb +600 -493
  92. data/lib/rdoc/markup/to_html_crossref.rb +221 -191
  93. data/lib/rdoc/markup/to_html_snippet.rb +232 -227
  94. data/lib/rdoc/markup/to_joined_paragraph.rb +40 -41
  95. data/lib/rdoc/markup/to_label.rb +63 -59
  96. data/lib/rdoc/markup/to_markdown.rb +212 -208
  97. data/lib/rdoc/markup/to_rdoc.rb +336 -332
  98. data/lib/rdoc/markup/to_table_of_contents.rb +66 -62
  99. data/lib/rdoc/markup/to_test.rb +60 -56
  100. data/lib/rdoc/markup/to_tt_only.rb +83 -86
  101. data/lib/rdoc/markup/verbatim.rb +62 -58
  102. data/lib/rdoc/markup.rb +198 -196
  103. data/lib/rdoc/options.rb +1063 -1076
  104. data/lib/rdoc/parser/c.rb +1039 -1036
  105. data/lib/rdoc/parser/changelog.rb +319 -315
  106. data/lib/rdoc/parser/markdown.rb +17 -13
  107. data/lib/rdoc/parser/rbs.rb +279 -0
  108. data/lib/rdoc/parser/rd.rb +17 -13
  109. data/lib/rdoc/parser/ruby.rb +1231 -2222
  110. data/lib/rdoc/parser/ruby_colorizer.rb +303 -0
  111. data/lib/rdoc/parser/simple.rb +31 -27
  112. data/lib/rdoc/parser/text.rb +12 -8
  113. data/lib/rdoc/parser.rb +230 -221
  114. data/lib/rdoc/rbs_helper.rb +186 -0
  115. data/lib/rdoc/rd/inline.rb +57 -53
  116. data/lib/rdoc/rd.rb +90 -88
  117. data/lib/rdoc/rdoc.rb +547 -366
  118. data/lib/rdoc/ri/driver.rb +1141 -1130
  119. data/lib/rdoc/ri/formatter.rb +7 -3
  120. data/lib/rdoc/ri/paths.rb +140 -136
  121. data/lib/rdoc/ri/servlet.rb +456 -0
  122. data/lib/rdoc/ri/store.rb +4 -2
  123. data/lib/rdoc/ri/task.rb +55 -51
  124. data/lib/rdoc/ri.rb +14 -11
  125. data/lib/rdoc/rubygems_hook.rb +194 -192
  126. data/lib/rdoc/server.rb +462 -0
  127. data/lib/rdoc/stats/normal.rb +46 -42
  128. data/lib/rdoc/stats/quiet.rb +39 -35
  129. data/lib/rdoc/stats/verbose.rb +35 -31
  130. data/lib/rdoc/stats.rb +363 -338
  131. data/lib/rdoc/store.rb +919 -725
  132. data/lib/rdoc/task.rb +260 -255
  133. data/lib/rdoc/text.rb +130 -245
  134. data/lib/rdoc/token_stream.rb +101 -115
  135. data/lib/rdoc/tom_doc.rb +203 -201
  136. data/lib/rdoc/version.rb +1 -1
  137. data/lib/rdoc.rb +35 -7
  138. data/lib/rubygems_plugin.rb +2 -11
  139. data/rdoc-logo.svg +43 -0
  140. data/rdoc.gemspec +6 -4
  141. metadata +36 -20
  142. data/lib/rdoc/code_object/anon_class.rb +0 -10
  143. data/lib/rdoc/code_object/ghost_method.rb +0 -6
  144. data/lib/rdoc/code_object/meta_method.rb +0 -6
  145. data/lib/rdoc/markdown/literals.kpeg +0 -21
  146. data/lib/rdoc/markdown/literals.rb +0 -454
  147. data/lib/rdoc/parser/prism_ruby.rb +0 -1112
  148. data/lib/rdoc/parser/ripper_state_lex.rb +0 -302
  149. data/lib/rdoc/parser/ruby_tools.rb +0 -163
  150. data/lib/rdoc/servlet.rb +0 -452
@@ -1,141 +1,147 @@
1
1
  # frozen_string_literal: true
2
- ##
3
- # A PO entry in PO
4
-
5
- class RDoc::Generator::POT::POEntry
6
-
7
- # The msgid content
8
- attr_reader :msgid
9
-
10
- # The msgstr content
11
- attr_reader :msgstr
12
-
13
- # The comment content created by translator (PO editor)
14
- attr_reader :translator_comment
15
-
16
- # The comment content extracted from source file
17
- attr_reader :extracted_comment
18
-
19
- # The locations where the PO entry is extracted
20
- attr_reader :references
21
-
22
- # The flags of the PO entry
23
- attr_reader :flags
24
-
25
- ##
26
- # Creates a PO entry for +msgid+. Other values can be specified by
27
- # +options+.
28
-
29
- def initialize(msgid, options = {})
30
- @msgid = msgid
31
- @msgstr = options[:msgstr] || ""
32
- @translator_comment = options[:translator_comment]
33
- @extracted_comment = options[:extracted_comment]
34
- @references = options[:references] || []
35
- @flags = options[:flags] || []
36
- end
37
-
38
- ##
39
- # Returns the PO entry in PO format.
40
-
41
- def to_s
42
- entry = ''
43
- entry += format_translator_comment
44
- entry += format_extracted_comment
45
- entry += format_references
46
- entry += format_flags
47
- entry += <<-ENTRY
2
+ module RDoc
3
+ module Generator
4
+ class POT
5
+ ##
6
+ # A PO entry in PO
7
+
8
+ class POEntry
9
+
10
+ # The msgid content
11
+ attr_reader :msgid
12
+
13
+ # The msgstr content
14
+ attr_reader :msgstr
15
+
16
+ # The comment content created by translator (PO editor)
17
+ attr_reader :translator_comment
18
+
19
+ # The comment content extracted from source file
20
+ attr_reader :extracted_comment
21
+
22
+ # The locations where the PO entry is extracted
23
+ attr_reader :references
24
+
25
+ # The flags of the PO entry
26
+ attr_reader :flags
27
+
28
+ ##
29
+ # Creates a PO entry for +msgid+. Other values can be specified by
30
+ # +options+.
31
+
32
+ def initialize(msgid, options = {})
33
+ @msgid = msgid
34
+ @msgstr = options[:msgstr] || ""
35
+ @translator_comment = options[:translator_comment]
36
+ @extracted_comment = options[:extracted_comment]
37
+ @references = options[:references] || []
38
+ @flags = options[:flags] || []
39
+ end
40
+
41
+ ##
42
+ # Returns the PO entry in PO format.
43
+
44
+ def to_s
45
+ entry = ''
46
+ entry += format_translator_comment
47
+ entry += format_extracted_comment
48
+ entry += format_references
49
+ entry += format_flags
50
+ entry += <<-ENTRY
48
51
  msgid #{format_message(@msgid)}
49
52
  msgstr #{format_message(@msgstr)}
50
53
  ENTRY
51
- end
52
-
53
- ##
54
- # Merges the PO entry with +other_entry+.
55
-
56
- def merge(other_entry)
57
- options = {
58
- :extracted_comment => merge_string(@extracted_comment,
59
- other_entry.extracted_comment),
60
- :translator_comment => merge_string(@translator_comment,
61
- other_entry.translator_comment),
62
- :references => merge_array(@references,
63
- other_entry.references),
64
- :flags => merge_array(@flags,
65
- other_entry.flags),
66
- }
67
- self.class.new(@msgid, options)
68
- end
69
-
70
- private
71
-
72
- def format_comment(mark, comment)
73
- return '' unless comment
74
- return '' if comment.empty?
75
-
76
- formatted_comment = ''
77
- comment.each_line do |line|
78
- formatted_comment += "#{mark} #{line}"
79
- end
80
- formatted_comment += "\n" unless formatted_comment.end_with?("\n")
81
- formatted_comment
82
- end
54
+ end
55
+
56
+ ##
57
+ # Merges the PO entry with +other_entry+.
58
+
59
+ def merge(other_entry)
60
+ options = {
61
+ :extracted_comment => merge_string(@extracted_comment,
62
+ other_entry.extracted_comment),
63
+ :translator_comment => merge_string(@translator_comment,
64
+ other_entry.translator_comment),
65
+ :references => merge_array(@references,
66
+ other_entry.references),
67
+ :flags => merge_array(@flags,
68
+ other_entry.flags),
69
+ }
70
+ self.class.new(@msgid, options)
71
+ end
72
+
73
+ private
74
+
75
+ def format_comment(mark, comment)
76
+ return '' unless comment
77
+ return '' if comment.empty?
78
+
79
+ formatted_comment = ''
80
+ comment.each_line do |line|
81
+ formatted_comment += "#{mark} #{line}"
82
+ end
83
+ formatted_comment += "\n" unless formatted_comment.end_with?("\n")
84
+ formatted_comment
85
+ end
86
+
87
+ def format_translator_comment
88
+ format_comment('#', @translator_comment)
89
+ end
90
+
91
+ def format_extracted_comment
92
+ format_comment('#.', @extracted_comment)
93
+ end
94
+
95
+ def format_references
96
+ return '' if @references.empty?
97
+
98
+ formatted_references = ''
99
+ @references.sort.each do |file, line|
100
+ formatted_references += "\#: #{file}:#{line}\n"
101
+ end
102
+ formatted_references
103
+ end
104
+
105
+ def format_flags
106
+ return '' if @flags.empty?
107
+
108
+ formatted_flags = flags.join(",")
109
+ "\#, #{formatted_flags}\n"
110
+ end
111
+
112
+ def format_message(message)
113
+ return "\"#{escape(message)}\"" unless message.include?("\n")
114
+
115
+ formatted_message = '""'
116
+ message.each_line do |line|
117
+ formatted_message += "\n"
118
+ formatted_message += "\"#{escape(line)}\""
119
+ end
120
+ formatted_message
121
+ end
122
+
123
+ def escape(string)
124
+ string.gsub(/["\\\t\n]/) do |special_character|
125
+ case special_character
126
+ when "\t"
127
+ "\\t"
128
+ when "\n"
129
+ "\\n"
130
+ else
131
+ "\\#{special_character}"
132
+ end
133
+ end
134
+ end
135
+
136
+ def merge_string(string1, string2)
137
+ [string1, string2].compact.join("\n")
138
+ end
139
+
140
+ def merge_array(array1, array2)
141
+ (array1 + array2).uniq
142
+ end
83
143
 
84
- def format_translator_comment
85
- format_comment('#', @translator_comment)
86
- end
87
-
88
- def format_extracted_comment
89
- format_comment('#.', @extracted_comment)
90
- end
91
-
92
- def format_references
93
- return '' if @references.empty?
94
-
95
- formatted_references = ''
96
- @references.sort.each do |file, line|
97
- formatted_references += "\#: #{file}:#{line}\n"
98
- end
99
- formatted_references
100
- end
101
-
102
- def format_flags
103
- return '' if @flags.empty?
104
-
105
- formatted_flags = flags.join(",")
106
- "\#, #{formatted_flags}\n"
107
- end
108
-
109
- def format_message(message)
110
- return "\"#{escape(message)}\"" unless message.include?("\n")
111
-
112
- formatted_message = '""'
113
- message.each_line do |line|
114
- formatted_message += "\n"
115
- formatted_message += "\"#{escape(line)}\""
116
- end
117
- formatted_message
118
- end
119
-
120
- def escape(string)
121
- string.gsub(/["\\\t\n]/) do |special_character|
122
- case special_character
123
- when "\t"
124
- "\\t"
125
- when "\n"
126
- "\\n"
127
- else
128
- "\\#{special_character}"
129
144
  end
130
145
  end
131
146
  end
132
-
133
- def merge_string(string1, string2)
134
- [string1, string2].compact.join("\n")
135
- end
136
-
137
- def merge_array(array1, array2)
138
- (array1 + array2).uniq
139
- end
140
-
141
147
  end
@@ -1,94 +1,98 @@
1
1
  # frozen_string_literal: true
2
- ##
3
- # Generates a POT file.
4
- #
5
- # Here is a translator work flow with the generator.
6
- #
7
- # == Create .pot
8
- #
9
- # You create .pot file by pot formatter:
10
- #
11
- # % rdoc --format pot
12
- #
13
- # It generates doc/rdoc.pot.
14
- #
15
- # == Create .po
16
- #
17
- # You create .po file from doc/rdoc.pot. This operation is needed only
18
- # the first time. This work flow assumes that you are a translator
19
- # for Japanese.
20
- #
21
- # You create locale/ja/rdoc.po from doc/rdoc.pot. You can use msginit
22
- # provided by GNU gettext or rmsginit provided by gettext gem. This
23
- # work flow uses gettext gem because it is more portable than GNU
24
- # gettext for Rubyists. Gettext gem is implemented by pure Ruby.
25
- #
26
- # % gem install gettext
27
- # % mkdir -p locale/ja
28
- # % rmsginit --input doc/rdoc.pot --output locale/ja/rdoc.po --locale ja
29
- #
30
- # Translate messages in .po
31
- #
32
- # You translate messages in .po by a PO file editor. po-mode.el exists
33
- # for Emacs users. There are some GUI tools such as GTranslator.
34
- # There are some Web services such as POEditor and Tansifex. You can
35
- # edit by your favorite text editor because .po is a text file.
36
- # Generate localized documentation
37
- #
38
- # You can generate localized documentation with locale/ja/rdoc.po:
39
- #
40
- # % rdoc --locale ja
41
- #
42
- # You can find documentation in Japanese in doc/. Yay!
43
- #
44
- # == Update translation
45
- #
46
- # You need to update translation when your application is added or
47
- # modified messages.
48
- #
49
- # You can update .po by the following command lines:
50
- #
51
- # % rdoc --format pot
52
- # % rmsgmerge --update locale/ja/rdoc.po doc/rdoc.pot
53
- #
54
- # You edit locale/ja/rdoc.po to translate new messages.
2
+ module RDoc
3
+ module Generator
4
+ ##
5
+ # Generates a POT file.
6
+ #
7
+ # Here is a translator work flow with the generator.
8
+ #
9
+ # == Create .pot
10
+ #
11
+ # You create .pot file by pot formatter:
12
+ #
13
+ # % rdoc --format pot
14
+ #
15
+ # It generates doc/rdoc.pot.
16
+ #
17
+ # == Create .po
18
+ #
19
+ # You create .po file from doc/rdoc.pot. This operation is needed only
20
+ # the first time. This work flow assumes that you are a translator
21
+ # for Japanese.
22
+ #
23
+ # You create locale/ja/rdoc.po from doc/rdoc.pot. You can use msginit
24
+ # provided by GNU gettext or rmsginit provided by gettext gem. This
25
+ # work flow uses gettext gem because it is more portable than GNU
26
+ # gettext for Rubyists. Gettext gem is implemented by pure Ruby.
27
+ #
28
+ # % gem install gettext
29
+ # % mkdir -p locale/ja
30
+ # % rmsginit --input doc/rdoc.pot --output locale/ja/rdoc.po --locale ja
31
+ #
32
+ # Translate messages in .po
33
+ #
34
+ # You translate messages in .po by a PO file editor. po-mode.el exists
35
+ # for Emacs users. There are some GUI tools such as GTranslator.
36
+ # There are some Web services such as POEditor and Tansifex. You can
37
+ # edit by your favorite text editor because .po is a text file.
38
+ # Generate localized documentation
39
+ #
40
+ # You can generate localized documentation with locale/ja/rdoc.po:
41
+ #
42
+ # % rdoc --locale ja
43
+ #
44
+ # You can find documentation in Japanese in doc/. Yay!
45
+ #
46
+ # == Update translation
47
+ #
48
+ # You need to update translation when your application is added or
49
+ # modified messages.
50
+ #
51
+ # You can update .po by the following command lines:
52
+ #
53
+ # % rdoc --format pot
54
+ # % rmsgmerge --update locale/ja/rdoc.po doc/rdoc.pot
55
+ #
56
+ # You edit locale/ja/rdoc.po to translate new messages.
55
57
 
56
- class RDoc::Generator::POT
58
+ class POT
57
59
 
58
- RDoc::RDoc.add_generator self
60
+ RDoc.add_generator self
59
61
 
60
- ##
61
- # Description of this generator
62
+ ##
63
+ # Description of this generator
62
64
 
63
- DESCRIPTION = 'creates .pot file'
65
+ DESCRIPTION = 'creates .pot file'
64
66
 
65
- ##
66
- # Set up a new .pot generator
67
+ ##
68
+ # Set up a new .pot generator
67
69
 
68
- def initialize(store, options) #:not-new:
69
- @options = options
70
- @store = store
71
- end
70
+ def initialize(store, options) #:not-new:
71
+ @options = options
72
+ @store = store
73
+ end
72
74
 
73
- ##
74
- # Writes .pot to disk.
75
+ ##
76
+ # Writes .pot to disk.
75
77
 
76
- def generate
77
- po = extract_messages
78
- pot_path = 'rdoc.pot'
79
- File.open(pot_path, "w") do |pot|
80
- pot.print(po.to_s)
81
- end
82
- end
78
+ def generate
79
+ po = extract_messages
80
+ pot_path = 'rdoc.pot'
81
+ File.open(pot_path, "w") do |pot|
82
+ pot.print(po.to_s)
83
+ end
84
+ end
83
85
 
84
- private
85
- def extract_messages
86
- extractor = MessageExtractor.new(@store)
87
- extractor.extract
88
- end
86
+ private
87
+ def extract_messages
88
+ extractor = MessageExtractor.new(@store)
89
+ extractor.extract
90
+ end
89
91
 
90
- require_relative 'pot/message_extractor'
91
- require_relative 'pot/po'
92
- require_relative 'pot/po_entry'
92
+ require_relative 'pot/message_extractor'
93
+ require_relative 'pot/po'
94
+ require_relative 'pot/po_entry'
93
95
 
96
+ end
97
+ end
94
98
  end
@@ -1,30 +1,34 @@
1
1
  # frozen_string_literal: true
2
- ##
3
- # Generates ri data files
2
+ module RDoc
3
+ module Generator
4
+ ##
5
+ # Generates ri data files
4
6
 
5
- class RDoc::Generator::RI
7
+ class RI
6
8
 
7
- RDoc::RDoc.add_generator self
9
+ RDoc.add_generator self
8
10
 
9
- ##
10
- # Description of this generator
11
+ ##
12
+ # Description of this generator
11
13
 
12
- DESCRIPTION = 'creates ri data files'
14
+ DESCRIPTION = 'creates ri data files'
13
15
 
14
- ##
15
- # Set up a new ri generator
16
+ ##
17
+ # Set up a new ri generator
16
18
 
17
- def initialize(store, options) #:not-new:
18
- @options = options
19
- @store = store
20
- @store.path = '.'
21
- end
19
+ def initialize(store, options) #:not-new:
20
+ @options = options
21
+ @store = store
22
+ @store.path = '.'
23
+ end
22
24
 
23
- ##
24
- # Writes the parsed data store to disk for use by ri.
25
+ ##
26
+ # Writes the parsed data store to disk for use by ri.
25
27
 
26
- def generate
27
- @store.save
28
- end
28
+ def generate
29
+ @store.save
30
+ end
29
31
 
32
+ end
33
+ end
30
34
  end