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