rdoc 6.13.0 → 6.17.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.
- checksums.yaml +4 -4
- data/History.rdoc +1 -1
- data/README.md +112 -0
- data/RI.md +1 -1
- data/lib/rdoc/code_object/any_method.rb +4 -4
- data/lib/rdoc/code_object/attr.rb +3 -3
- data/lib/rdoc/code_object/class_module.rb +18 -16
- data/lib/rdoc/code_object/constant.rb +5 -5
- data/lib/rdoc/code_object/context/section.rb +8 -7
- data/lib/rdoc/code_object/context.rb +19 -19
- data/lib/rdoc/code_object/method_attr.rb +7 -6
- data/lib/rdoc/code_object/mixin.rb +3 -3
- data/lib/rdoc/code_object/normal_class.rb +1 -1
- data/lib/rdoc/code_object/normal_module.rb +1 -1
- data/lib/rdoc/code_object/single_class.rb +1 -1
- data/lib/rdoc/code_object/top_level.rb +28 -33
- data/lib/rdoc/code_object.rb +3 -3
- data/lib/rdoc/comment.rb +196 -14
- data/lib/rdoc/cross_reference.rb +4 -4
- data/lib/rdoc/encoding.rb +4 -4
- data/lib/rdoc/erb_partial.rb +1 -1
- data/lib/rdoc/erbio.rb +2 -2
- data/lib/rdoc/generator/aliki.rb +42 -0
- data/lib/rdoc/generator/darkfish.rb +20 -16
- data/lib/rdoc/generator/json_index.rb +3 -3
- data/lib/rdoc/generator/markup.rb +12 -0
- data/lib/rdoc/generator/pot/message_extractor.rb +4 -4
- data/lib/rdoc/generator/pot/po.rb +1 -1
- data/lib/rdoc/generator/pot/po_entry.rb +7 -7
- data/lib/rdoc/generator/pot.rb +1 -1
- data/lib/rdoc/generator/ri.rb +1 -1
- data/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +8 -0
- data/lib/rdoc/generator/template/aliki/_footer.rhtml +23 -0
- data/lib/rdoc/generator/template/aliki/_head.rhtml +158 -0
- data/lib/rdoc/generator/template/aliki/_header.rhtml +56 -0
- data/lib/rdoc/generator/template/aliki/_icons.rhtml +208 -0
- data/lib/rdoc/generator/template/aliki/_sidebar_ancestors.rhtml +16 -0
- data/lib/rdoc/generator/template/aliki/_sidebar_classes.rhtml +15 -0
- data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +25 -0
- data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +25 -0
- data/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +16 -0
- data/lib/rdoc/generator/template/aliki/_sidebar_methods.rhtml +41 -0
- data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +67 -0
- data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +15 -0
- data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +21 -0
- data/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +3 -0
- data/lib/rdoc/generator/template/aliki/class.rhtml +220 -0
- data/lib/rdoc/generator/template/aliki/css/rdoc.css +1737 -0
- data/lib/rdoc/generator/template/aliki/index.rhtml +22 -0
- data/lib/rdoc/generator/template/aliki/js/aliki.js +483 -0
- data/lib/rdoc/generator/template/aliki/js/c_highlighter.js +299 -0
- data/lib/rdoc/generator/template/aliki/js/search.js +120 -0
- data/lib/rdoc/generator/template/aliki/js/theme-toggle.js +112 -0
- data/lib/rdoc/generator/template/aliki/page.rhtml +18 -0
- data/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +14 -0
- data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +65 -0
- data/lib/rdoc/generator/template/darkfish/_footer.rhtml +3 -3
- data/lib/rdoc/generator/template/darkfish/_head.rhtml +16 -16
- data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +8 -8
- data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +8 -8
- data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +7 -6
- data/lib/rdoc/generator/template/darkfish/_sidebar_methods.rhtml +6 -6
- data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +19 -19
- data/lib/rdoc/generator/template/darkfish/_sidebar_parent.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_sidebar_search.rhtml +1 -0
- data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +3 -3
- data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +14 -14
- data/lib/rdoc/generator/template/darkfish/class.rhtml +62 -60
- data/lib/rdoc/generator/template/darkfish/css/rdoc.css +2 -0
- data/lib/rdoc/generator/template/darkfish/index.rhtml +4 -3
- data/lib/rdoc/generator/template/darkfish/js/darkfish.js +21 -1
- data/lib/rdoc/generator/template/darkfish/js/search.js +11 -1
- data/lib/rdoc/generator/template/darkfish/page.rhtml +2 -1
- data/lib/rdoc/generator/template/darkfish/servlet_not_found.rhtml +2 -1
- data/lib/rdoc/generator/template/darkfish/servlet_root.rhtml +19 -19
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +19 -17
- data/lib/rdoc/generator/template/json_index/js/searcher.js +48 -6
- data/lib/rdoc/generator.rb +1 -0
- data/lib/rdoc/markdown.kpeg +72 -18
- data/lib/rdoc/markdown.rb +411 -547
- data/lib/rdoc/markup/attribute_manager.rb +5 -5
- data/lib/rdoc/markup/attributes.rb +3 -3
- data/lib/rdoc/markup/blank_line.rb +2 -2
- data/lib/rdoc/markup/block_quote.rb +1 -1
- data/lib/rdoc/markup/document.rb +8 -8
- data/lib/rdoc/markup/formatter.rb +12 -12
- data/lib/rdoc/markup/hard_break.rb +3 -3
- data/lib/rdoc/markup/heading.rb +4 -4
- data/lib/rdoc/markup/include.rb +3 -3
- data/lib/rdoc/markup/indented_paragraph.rb +3 -3
- data/lib/rdoc/markup/list.rb +4 -4
- data/lib/rdoc/markup/list_item.rb +4 -4
- data/lib/rdoc/markup/paragraph.rb +2 -2
- data/lib/rdoc/markup/parser.rb +11 -11
- data/lib/rdoc/markup/pre_process.rb +39 -15
- data/lib/rdoc/markup/raw.rb +5 -5
- data/lib/rdoc/markup/rule.rb +2 -2
- data/lib/rdoc/markup/table.rb +4 -4
- data/lib/rdoc/markup/to_ansi.rb +7 -3
- data/lib/rdoc/markup/to_bs.rb +10 -6
- data/lib/rdoc/markup/to_html.rb +182 -30
- data/lib/rdoc/markup/to_html_crossref.rb +58 -28
- data/lib/rdoc/markup/to_html_snippet.rb +17 -17
- data/lib/rdoc/markup/to_joined_paragraph.rb +1 -1
- data/lib/rdoc/markup/to_label.rb +6 -5
- data/lib/rdoc/markup/to_markdown.rb +12 -12
- data/lib/rdoc/markup/to_rdoc.rb +40 -31
- data/lib/rdoc/markup/to_table_of_contents.rb +3 -3
- data/lib/rdoc/markup/to_test.rb +1 -1
- data/lib/rdoc/markup/to_tt_only.rb +8 -8
- data/lib/rdoc/markup/verbatim.rb +3 -3
- data/lib/rdoc/markup.rb +3 -3
- data/lib/rdoc/options.rb +53 -23
- data/lib/rdoc/parser/c.rb +31 -62
- data/lib/rdoc/parser/changelog.rb +9 -9
- data/lib/rdoc/parser/prism_ruby.rb +122 -114
- data/lib/rdoc/parser/ruby.rb +51 -51
- data/lib/rdoc/parser/ruby_tools.rb +5 -7
- data/lib/rdoc/parser/simple.rb +5 -22
- data/lib/rdoc/parser.rb +8 -8
- data/lib/rdoc/rd/inline.rb +4 -4
- data/lib/rdoc/rd.rb +1 -1
- data/lib/rdoc/rdoc.rb +9 -8
- data/lib/rdoc/ri/driver.rb +49 -49
- data/lib/rdoc/ri/paths.rb +2 -2
- data/lib/rdoc/ri/task.rb +3 -3
- data/lib/rdoc/rubygems_hook.rb +14 -11
- data/lib/rdoc/servlet.rb +15 -15
- data/lib/rdoc/stats/normal.rb +1 -1
- data/lib/rdoc/stats/quiet.rb +1 -1
- data/lib/rdoc/stats/verbose.rb +3 -3
- data/lib/rdoc/stats.rb +12 -12
- data/lib/rdoc/store.rb +32 -32
- data/lib/rdoc/task.rb +6 -6
- data/lib/rdoc/text.rb +11 -11
- data/lib/rdoc/token_stream.rb +14 -2
- data/lib/rdoc/tom_doc.rb +8 -8
- data/lib/rdoc/version.rb +1 -1
- data/man/ri.1 +2 -0
- data/rdoc.gemspec +72 -0
- metadata +61 -6
- data/README.rdoc +0 -142
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
<body role="document" class="<%= klass.type %> has-toc">
|
|
2
|
+
<%= render '_icons.rhtml' %>
|
|
3
|
+
<%= render '_header.rhtml' %>
|
|
4
|
+
<%= render '_sidebar_toggle.rhtml' %>
|
|
5
|
+
|
|
6
|
+
<nav id="navigation" role="navigation">
|
|
7
|
+
<%= render '_sidebar_pages.rhtml' %>
|
|
8
|
+
<%= render '_sidebar_sections.rhtml' %>
|
|
9
|
+
<%= render '_sidebar_ancestors.rhtml' %>
|
|
10
|
+
<%= render '_sidebar_includes.rhtml' %>
|
|
11
|
+
<%= render '_sidebar_extends.rhtml' %>
|
|
12
|
+
<%= render '_sidebar_methods.rhtml' %>
|
|
13
|
+
<%= render '_sidebar_classes.rhtml' %>
|
|
14
|
+
</nav>
|
|
15
|
+
|
|
16
|
+
<main role="main" aria-labelledby="<%= h klass.aref %>">
|
|
17
|
+
<%# If nesting level is 1, breadcrumb list is not needed %>
|
|
18
|
+
<% if breadcrumb.size > 1 %>
|
|
19
|
+
<ol role="navigation" aria-label="Breadcrumb navigation" class="breadcrumb">
|
|
20
|
+
<% breadcrumb.each do |namespace| %>
|
|
21
|
+
<li>
|
|
22
|
+
<% if namespace[:self] %>
|
|
23
|
+
<span><%= namespace[:name] %></span>
|
|
24
|
+
<% else %>
|
|
25
|
+
<a href="<%= namespace[:path] %>"><%= namespace[:name] %></a><span>::</span>
|
|
26
|
+
<% end %>
|
|
27
|
+
</li>
|
|
28
|
+
<% end %>
|
|
29
|
+
</ol>
|
|
30
|
+
<% end %>
|
|
31
|
+
|
|
32
|
+
<h1 id="<%= h klass.aref %>" class="anchor-link <%= klass.type %>">
|
|
33
|
+
<%= klass.type %> <%= klass.full_name %>
|
|
34
|
+
</h1>
|
|
35
|
+
|
|
36
|
+
<section class="description">
|
|
37
|
+
<%= klass.description %>
|
|
38
|
+
</section>
|
|
39
|
+
|
|
40
|
+
<%- klass.each_section do |section, constants, attributes| %>
|
|
41
|
+
<section id="<%= section.aref %>" class="documentation-section anchor-link">
|
|
42
|
+
<%- if section.title then %>
|
|
43
|
+
<header class="documentation-section-title">
|
|
44
|
+
<h2>
|
|
45
|
+
<a href="#<%= section.aref %>"><%= section.title %></a>
|
|
46
|
+
</h2>
|
|
47
|
+
</header>
|
|
48
|
+
<%- end %>
|
|
49
|
+
|
|
50
|
+
<%- if section.comment then %>
|
|
51
|
+
<div>
|
|
52
|
+
<%= section.description %>
|
|
53
|
+
</div>
|
|
54
|
+
<%- end %>
|
|
55
|
+
|
|
56
|
+
<%- unless constants.empty? then %>
|
|
57
|
+
<section class="constants-list">
|
|
58
|
+
<header>
|
|
59
|
+
<h3 id="constants"><a href="#constants">Constants</a></h3>
|
|
60
|
+
</header>
|
|
61
|
+
<dl>
|
|
62
|
+
<%- constants.each do |const| %>
|
|
63
|
+
<dt id="<%= const.name %>"><%= const.name %></dt>
|
|
64
|
+
<%- if const.comment then %>
|
|
65
|
+
<dd>
|
|
66
|
+
<%- if const.mixin_from then %>
|
|
67
|
+
<div class="mixin-from">
|
|
68
|
+
Included from <a href="<%= klass.aref_to(const.mixin_from.path) %>"><%= const.mixin_from.full_name %></a>
|
|
69
|
+
</div>
|
|
70
|
+
<%- end %>
|
|
71
|
+
<%= const.description.strip %>
|
|
72
|
+
</dd>
|
|
73
|
+
<%- else %>
|
|
74
|
+
<dd class="missing-docs">(Not documented)</dd>
|
|
75
|
+
<%- end %>
|
|
76
|
+
<%- end %>
|
|
77
|
+
</dl>
|
|
78
|
+
</section>
|
|
79
|
+
<%- end %>
|
|
80
|
+
|
|
81
|
+
<%- unless attributes.empty? then %>
|
|
82
|
+
<section class="attribute-method-details method-section">
|
|
83
|
+
<header>
|
|
84
|
+
<h3 id="attributes"><a href="#attributes">Attributes</a></h3>
|
|
85
|
+
</header>
|
|
86
|
+
|
|
87
|
+
<%- attributes.each do |attrib| %>
|
|
88
|
+
<div id="<%= attrib.aref %>" class="method-detail anchor-link">
|
|
89
|
+
<div class="method-heading attribute-method-heading">
|
|
90
|
+
<a href="#<%= attrib.aref %>" title="Link to this attribute">
|
|
91
|
+
<span class="method-name"><%= h attrib.name %></span>
|
|
92
|
+
<span class="attribute-access-type">[<%= attrib.rw %>]</span>
|
|
93
|
+
</a>
|
|
94
|
+
</div>
|
|
95
|
+
|
|
96
|
+
<div class="method-description">
|
|
97
|
+
<%- if attrib.mixin_from then %>
|
|
98
|
+
<div class="mixin-from">
|
|
99
|
+
<%= attrib.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(attrib.mixin_from.path) %>"><%= attrib.mixin_from.full_name %></a>
|
|
100
|
+
</div>
|
|
101
|
+
<%- end %>
|
|
102
|
+
<%- if attrib.comment then %>
|
|
103
|
+
<%= attrib.description.strip %>
|
|
104
|
+
<%- else %>
|
|
105
|
+
<p class="missing-docs">(Not documented)</p>
|
|
106
|
+
<%- end %>
|
|
107
|
+
</div>
|
|
108
|
+
</div>
|
|
109
|
+
<%- end %>
|
|
110
|
+
</section>
|
|
111
|
+
<%- end %>
|
|
112
|
+
|
|
113
|
+
<%- klass.methods_by_type(section).each do |type, visibilities|
|
|
114
|
+
next if visibilities.empty?
|
|
115
|
+
visibilities.each do |visibility, methods|
|
|
116
|
+
next if methods.empty? %>
|
|
117
|
+
<section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section anchor-link">
|
|
118
|
+
<header>
|
|
119
|
+
<h3 id="<%= visibility %>-<%= type %>-methods"><a href="#<%= visibility %>-<%= type %>-methods"><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</a></h3>
|
|
120
|
+
</header>
|
|
121
|
+
|
|
122
|
+
<%- methods.each do |method| %>
|
|
123
|
+
<div id="<%= method.aref %>" class="method-detail anchor-link <%= method.is_alias_for ? "method-alias" : '' %>">
|
|
124
|
+
<div class="method-header">
|
|
125
|
+
<%- if (call_seq = method.call_seq) then %>
|
|
126
|
+
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
|
|
127
|
+
<div class="method-heading">
|
|
128
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
|
129
|
+
<span class="method-callseq">
|
|
130
|
+
<%= h(call_seq.strip.
|
|
131
|
+
gsub( /^\w+\./m, '')).
|
|
132
|
+
gsub(/(.*)[-=]>/, '\1→') %>
|
|
133
|
+
</span>
|
|
134
|
+
</a>
|
|
135
|
+
</div>
|
|
136
|
+
<%- end %>
|
|
137
|
+
<%- elsif method.has_call_seq? then %>
|
|
138
|
+
<div class="method-heading">
|
|
139
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
|
140
|
+
<span class="method-name"><%= h method.name %></span>
|
|
141
|
+
</a>
|
|
142
|
+
</div>
|
|
143
|
+
<%- else %>
|
|
144
|
+
<div class="method-heading">
|
|
145
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
|
146
|
+
<span class="method-name"><%= h method.name %></span>
|
|
147
|
+
<span class="method-args"><%= h method.param_seq %></span>
|
|
148
|
+
</a>
|
|
149
|
+
</div>
|
|
150
|
+
<%- end %>
|
|
151
|
+
</div>
|
|
152
|
+
|
|
153
|
+
<%- if method.token_stream %>
|
|
154
|
+
<div class="method-controls">
|
|
155
|
+
<details class="method-source-toggle">
|
|
156
|
+
<summary>Source</summary>
|
|
157
|
+
</details>
|
|
158
|
+
</div>
|
|
159
|
+
<%- end %>
|
|
160
|
+
|
|
161
|
+
<%- unless method.skip_description? then %>
|
|
162
|
+
<div class="method-description">
|
|
163
|
+
<%- if method.token_stream then %>
|
|
164
|
+
<div class="method-source-code" id="<%= method.html_name %>-source">
|
|
165
|
+
<pre class="<%= method.source_language %>" data-language="<%= method.source_language %>"><%= method.markup_code %></pre>
|
|
166
|
+
</div>
|
|
167
|
+
<%- end %>
|
|
168
|
+
<%- if method.mixin_from then %>
|
|
169
|
+
<div class="mixin-from">
|
|
170
|
+
<%= method.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(method.mixin_from.path) %>"><%= method.mixin_from.full_name %></a>
|
|
171
|
+
</div>
|
|
172
|
+
<%- end %>
|
|
173
|
+
<%- if method.comment then %>
|
|
174
|
+
<%= method.description.strip %>
|
|
175
|
+
<%- else %>
|
|
176
|
+
<p class="missing-docs">(Not documented)</p>
|
|
177
|
+
<%- end %>
|
|
178
|
+
<%- if method.calls_super then %>
|
|
179
|
+
<div class="method-calls-super">
|
|
180
|
+
Calls superclass method
|
|
181
|
+
<%=
|
|
182
|
+
method.superclass_method ?
|
|
183
|
+
method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil
|
|
184
|
+
%>
|
|
185
|
+
</div>
|
|
186
|
+
<%- end %>
|
|
187
|
+
</div>
|
|
188
|
+
<%- end %>
|
|
189
|
+
|
|
190
|
+
<%- unless method.aliases.empty? then %>
|
|
191
|
+
<div class="aliases">
|
|
192
|
+
Also aliased as: <%= method.aliases.map do |aka|
|
|
193
|
+
if aka.parent then # HACK lib/rexml/encodings
|
|
194
|
+
%{<a href="#{klass.aref_to aka.path}">#{h aka.name}</a>}
|
|
195
|
+
else
|
|
196
|
+
h aka.name
|
|
197
|
+
end
|
|
198
|
+
end.join ", " %>
|
|
199
|
+
</div>
|
|
200
|
+
<%- end %>
|
|
201
|
+
|
|
202
|
+
<%- if method.is_alias_for then %>
|
|
203
|
+
<div class="aliases">
|
|
204
|
+
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
|
|
205
|
+
</div>
|
|
206
|
+
<%- end %>
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<%- end %>
|
|
210
|
+
</section>
|
|
211
|
+
<%- end
|
|
212
|
+
end %>
|
|
213
|
+
</section>
|
|
214
|
+
<%- end %>
|
|
215
|
+
</main>
|
|
216
|
+
|
|
217
|
+
<%= render '_aside_toc.rhtml' %>
|
|
218
|
+
|
|
219
|
+
<%= render '_footer.rhtml' %>
|
|
220
|
+
</body>
|