rdoc 7.0.2 → 7.0.4
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/CONTRIBUTING.md +9 -0
- data/lib/rdoc/code_object/class_module.rb +20 -5
- data/lib/rdoc/generator/darkfish.rb +1 -1
- data/lib/rdoc/generator/json_index.rb +1 -1
- data/lib/rdoc/generator/template/aliki/_head.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +8 -6
- data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +8 -6
- data/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +2 -2
- data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/class.rhtml +17 -17
- data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +8 -6
- data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +8 -6
- data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +1 -1
- data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +5 -5
- data/lib/rdoc/generator/template/darkfish/class.rhtml +17 -17
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +3 -3
- data/lib/rdoc/markup/blank_line.rb +25 -23
- data/lib/rdoc/markup/document.rb +2 -2
- data/lib/rdoc/markup/element.rb +21 -0
- data/lib/rdoc/markup/formatter.rb +1 -1
- data/lib/rdoc/markup/hard_break.rb +30 -27
- data/lib/rdoc/markup/heading.rb +96 -79
- data/lib/rdoc/markup/indented_paragraph.rb +1 -1
- data/lib/rdoc/markup/list.rb +2 -2
- data/lib/rdoc/markup/list_item.rb +2 -2
- data/lib/rdoc/markup/raw.rb +52 -55
- data/lib/rdoc/markup/table.rb +48 -40
- data/lib/rdoc/markup/verbatim.rb +1 -1
- data/lib/rdoc/markup.rb +1 -0
- data/lib/rdoc/parser/c.rb +1 -1
- data/lib/rdoc/ri/paths.rb +1 -1
- data/lib/rdoc/servlet.rb +1 -1
- data/lib/rdoc/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f1cf94593e8051515382dcf9c0b3ec1978bfea7542de9c6707350de54966a469
|
|
4
|
+
data.tar.gz: edea7f43da70876b79da12790ca76f94b3e1e253ede49ebc5207e50942981289
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4b80bd5257cdb6164ad8bae594fe9c254532795c5c6d7d99877d5b69da81b0ecb02cd97d11f113b227bd09654009df6cb2c7bbf6cc34fec27555f195612bf1a3
|
|
7
|
+
data.tar.gz: 377e1a00ee7b589247a60efa7ab0811501c7b1136f8c387db3c0b4928db87837141e3540dd77c98049cf10cc9e5f09427c36d2a918ee4d9f0c4dad712ddfafdf
|
data/CONTRIBUTING.md
CHANGED
|
@@ -86,6 +86,15 @@ npm run lint:css
|
|
|
86
86
|
npm run lint:css -- --fix
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
+
## Type annotations
|
|
90
|
+
|
|
91
|
+
RDoc is currently not a typed codebase. Despite not running a type checker, contributors have been
|
|
92
|
+
adding some comment annotations to make the codebase easier to navigate and understand.
|
|
93
|
+
|
|
94
|
+
These annotations use [Sorbet flavored RBS](https://sorbet.org/docs/rbs-support) annotations,
|
|
95
|
+
so that we can tag definitions as abstract and override. For more information on RBS syntax,
|
|
96
|
+
see the [documentation](https://github.com/ruby/rbs/blob/master/docs/syntax.md).
|
|
97
|
+
|
|
89
98
|
## Parser Generation
|
|
90
99
|
|
|
91
100
|
RDoc uses generated parsers for Markdown and RD formats.
|
|
@@ -30,7 +30,22 @@ class RDoc::ClassModule < RDoc::Context
|
|
|
30
30
|
attr_accessor :constant_aliases
|
|
31
31
|
|
|
32
32
|
##
|
|
33
|
-
#
|
|
33
|
+
# An array of `[comment, location]` pairs documenting this class/module.
|
|
34
|
+
# Use #add_comment to add comments.
|
|
35
|
+
#
|
|
36
|
+
# Before marshalling:
|
|
37
|
+
# - +comment+ is a String
|
|
38
|
+
# - +location+ is an RDoc::TopLevel
|
|
39
|
+
#
|
|
40
|
+
# After unmarshalling:
|
|
41
|
+
# - +comment+ is an RDoc::Markup::Document
|
|
42
|
+
# - +location+ is a filename String
|
|
43
|
+
#
|
|
44
|
+
# These type changes are acceptable (for now) because:
|
|
45
|
+
# - +comment+: Both String and Document respond to #empty?, and #parse
|
|
46
|
+
# returns Document as-is (see RDoc::Text#parse)
|
|
47
|
+
# - +location+: Only used by #parse to set Document#file, which accepts
|
|
48
|
+
# both TopLevel (extracts relative_name) and String
|
|
34
49
|
|
|
35
50
|
attr_accessor :comment_location
|
|
36
51
|
|
|
@@ -110,7 +125,7 @@ class RDoc::ClassModule < RDoc::Context
|
|
|
110
125
|
@is_alias_for = nil
|
|
111
126
|
@name = name
|
|
112
127
|
@superclass = superclass
|
|
113
|
-
@comment_location = [] # [
|
|
128
|
+
@comment_location = [] # Array of [comment, location] pairs
|
|
114
129
|
|
|
115
130
|
super()
|
|
116
131
|
end
|
|
@@ -379,10 +394,10 @@ class RDoc::ClassModule < RDoc::Context
|
|
|
379
394
|
|
|
380
395
|
@comment = RDoc::Comment.from_document document
|
|
381
396
|
|
|
382
|
-
@comment_location = if RDoc::Markup::Document
|
|
383
|
-
document
|
|
397
|
+
@comment_location = if document.parts.first.is_a?(RDoc::Markup::Document)
|
|
398
|
+
document.parts.map { |doc| [doc, doc.file] }
|
|
384
399
|
else
|
|
385
|
-
|
|
400
|
+
[[document, document.file]]
|
|
386
401
|
end
|
|
387
402
|
|
|
388
403
|
array[5].each do |name, rw, visibility, singleton, file|
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<%- elsif @title %>
|
|
29
29
|
<meta name="keywords" content="ruby,documentation,<%= h @title %>">
|
|
30
30
|
<%- if @options.main_page and
|
|
31
|
-
main_page = @files.find { |f| f.full_name == @options.main_page }
|
|
31
|
+
main_page = @files.find { |f| f.full_name == @options.main_page } %>
|
|
32
32
|
<meta
|
|
33
33
|
name="description"
|
|
34
34
|
content="<%= h "#{@title}: #{excerpt(main_page.comment)}" %>"
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%- unless klass.extends.empty?
|
|
1
|
+
<%- unless klass.extends.empty? %>
|
|
2
2
|
<div id="extends-section" class="nav-section">
|
|
3
3
|
<details class="nav-section-collapsible" open>
|
|
4
4
|
<summary class="nav-section-header">
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
<ul class="nav-list">
|
|
15
15
|
<%- klass.extends.each do |ext| %>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
<li>
|
|
17
|
+
<%- unless String === ext.module %>
|
|
18
|
+
<a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a>
|
|
19
|
+
<%- else %>
|
|
20
|
+
<span class="extend"><%= ext.name %></span>
|
|
21
|
+
<%- end %>
|
|
22
|
+
</li>
|
|
21
23
|
<%- end %>
|
|
22
24
|
</ul>
|
|
23
25
|
</details>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<%- unless klass.includes.empty?
|
|
1
|
+
<%- unless klass.includes.empty? %>
|
|
2
2
|
<div id="includes-section" class="nav-section">
|
|
3
3
|
<details class="nav-section-collapsible" open>
|
|
4
4
|
<summary class="nav-section-header">
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
|
|
14
14
|
<ul class="nav-list">
|
|
15
15
|
<%- klass.includes.each do |inc| %>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
<li>
|
|
17
|
+
<%- unless String === inc.module %>
|
|
18
|
+
<a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a>
|
|
19
|
+
<%- else %>
|
|
20
|
+
<span class="include"><%= inc.name %></span>
|
|
21
|
+
<%- end %>
|
|
22
|
+
</li>
|
|
21
23
|
<%- end %>
|
|
22
24
|
</ul>
|
|
23
25
|
</details>
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name %>
|
|
5
5
|
<%- end %>
|
|
6
6
|
|
|
7
|
-
<%- unless simple_files.empty?
|
|
7
|
+
<%- unless simple_files.empty? %>
|
|
8
8
|
<div id="fileindex-section" class="nav-section">
|
|
9
9
|
<details class="nav-section-collapsible" <%= 'open' unless @inside_class_file %>>
|
|
10
10
|
<summary class="nav-section-header">
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
<%= h f.page_name %>
|
|
36
36
|
</a>
|
|
37
37
|
</li>
|
|
38
|
-
<%- next
|
|
38
|
+
<%- next -%>
|
|
39
39
|
<%- end %>
|
|
40
40
|
|
|
41
41
|
<li>
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<% if namespace[:self] %>
|
|
23
23
|
<span><%= namespace[:name] %></span>
|
|
24
24
|
<% else %>
|
|
25
|
-
<a href="<%= namespace[:path] %>"><%= namespace[:name] %></a><span>::</span>
|
|
25
|
+
<a href="<%= namespace[:path] %>"><%= namespace[:name] %></a><span class="separator">::</span>
|
|
26
26
|
<% end %>
|
|
27
27
|
</li>
|
|
28
28
|
<% end %>
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
|
|
40
40
|
<%- klass.each_section do |section, constants, attributes| %>
|
|
41
41
|
<section id="<%= section.aref %>" class="documentation-section anchor-link">
|
|
42
|
-
<%- if section.title
|
|
42
|
+
<%- if section.title %>
|
|
43
43
|
<header class="documentation-section-title">
|
|
44
44
|
<h2>
|
|
45
45
|
<a href="#<%= section.aref %>"><%= section.title %></a>
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
</header>
|
|
48
48
|
<%- end %>
|
|
49
49
|
|
|
50
|
-
<%- if section.comment
|
|
50
|
+
<%- if section.comment %>
|
|
51
51
|
<div>
|
|
52
52
|
<%= section.description %>
|
|
53
53
|
</div>
|
|
54
54
|
<%- end %>
|
|
55
55
|
|
|
56
|
-
<%- unless constants.empty?
|
|
56
|
+
<%- unless constants.empty? %>
|
|
57
57
|
<section class="constants-list">
|
|
58
58
|
<header>
|
|
59
59
|
<h3 id="constants"><a href="#constants">Constants</a></h3>
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
<dl>
|
|
62
62
|
<%- constants.each do |const| %>
|
|
63
63
|
<dt id="<%= const.name %>"><%= const.name %></dt>
|
|
64
|
-
<%- if const.comment
|
|
64
|
+
<%- if const.comment %>
|
|
65
65
|
<dd>
|
|
66
|
-
<%- if const.mixin_from
|
|
66
|
+
<%- if const.mixin_from %>
|
|
67
67
|
<div class="mixin-from">
|
|
68
68
|
Included from <a href="<%= klass.aref_to(const.mixin_from.path) %>"><%= const.mixin_from.full_name %></a>
|
|
69
69
|
</div>
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
</section>
|
|
79
79
|
<%- end %>
|
|
80
80
|
|
|
81
|
-
<%- unless attributes.empty?
|
|
81
|
+
<%- unless attributes.empty? %>
|
|
82
82
|
<section class="attribute-method-details method-section">
|
|
83
83
|
<header>
|
|
84
84
|
<h3 id="attributes"><a href="#attributes">Attributes</a></h3>
|
|
@@ -94,12 +94,12 @@
|
|
|
94
94
|
</div>
|
|
95
95
|
|
|
96
96
|
<div class="method-description">
|
|
97
|
-
<%- if attrib.mixin_from
|
|
97
|
+
<%- if attrib.mixin_from %>
|
|
98
98
|
<div class="mixin-from">
|
|
99
99
|
<%= attrib.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(attrib.mixin_from.path) %>"><%= attrib.mixin_from.full_name %></a>
|
|
100
100
|
</div>
|
|
101
101
|
<%- end %>
|
|
102
|
-
<%- if attrib.comment
|
|
102
|
+
<%- if attrib.comment %>
|
|
103
103
|
<%= attrib.description.strip %>
|
|
104
104
|
<%- else %>
|
|
105
105
|
<p class="missing-docs">(Not documented)</p>
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
<%- methods.each do |method| %>
|
|
123
123
|
<div id="<%= method.aref %>" class="method-detail anchor-link <%= method.is_alias_for ? "method-alias" : '' %>">
|
|
124
124
|
<div class="method-header">
|
|
125
|
-
<%- if (call_seq = method.call_seq)
|
|
125
|
+
<%- if (call_seq = method.call_seq) %>
|
|
126
126
|
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
|
|
127
127
|
<div class="method-heading">
|
|
128
128
|
<a href="#<%= method.aref %>" title="Link to this method">
|
|
@@ -134,7 +134,7 @@
|
|
|
134
134
|
</a>
|
|
135
135
|
</div>
|
|
136
136
|
<%- end %>
|
|
137
|
-
<%- elsif method.has_call_seq?
|
|
137
|
+
<%- elsif method.has_call_seq? %>
|
|
138
138
|
<div class="method-heading">
|
|
139
139
|
<a href="#<%= method.aref %>" title="Link to this method">
|
|
140
140
|
<span class="method-name"><%= h method.name %></span>
|
|
@@ -161,19 +161,19 @@
|
|
|
161
161
|
</div>
|
|
162
162
|
<%- end %>
|
|
163
163
|
|
|
164
|
-
<%- unless method.skip_description?
|
|
164
|
+
<%- unless method.skip_description? %>
|
|
165
165
|
<div class="method-description">
|
|
166
|
-
<%- if method.mixin_from
|
|
166
|
+
<%- if method.mixin_from %>
|
|
167
167
|
<div class="mixin-from">
|
|
168
168
|
<%= method.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(method.mixin_from.path) %>"><%= method.mixin_from.full_name %></a>
|
|
169
169
|
</div>
|
|
170
170
|
<%- end %>
|
|
171
|
-
<%- if method.comment
|
|
171
|
+
<%- if method.comment %>
|
|
172
172
|
<%= method.description.strip %>
|
|
173
173
|
<%- else %>
|
|
174
174
|
<p class="missing-docs">(Not documented)</p>
|
|
175
175
|
<%- end %>
|
|
176
|
-
<%- if method.calls_super
|
|
176
|
+
<%- if method.calls_super %>
|
|
177
177
|
<div class="method-calls-super">
|
|
178
178
|
Calls superclass method
|
|
179
179
|
<%=
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
</div>
|
|
186
186
|
<%- end %>
|
|
187
187
|
|
|
188
|
-
<%- unless method.aliases.empty?
|
|
188
|
+
<%- unless method.aliases.empty? %>
|
|
189
189
|
<div class="aliases">
|
|
190
190
|
Also aliased as: <%= method.aliases.map do |aka|
|
|
191
191
|
if aka.parent then # HACK lib/rexml/encodings
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
</div>
|
|
198
198
|
<%- end %>
|
|
199
199
|
|
|
200
|
-
<%- if method.is_alias_for
|
|
200
|
+
<%- if method.is_alias_for %>
|
|
201
201
|
<div class="aliases">
|
|
202
202
|
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
|
|
203
203
|
</div>
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
|
|
43
43
|
<%- gems = installed.select { |_, _, _, type,| type == :gem } %>
|
|
44
44
|
<%- missing = gems.reject { |_, _, exists,| exists } %>
|
|
45
|
-
<%- unless missing.empty?
|
|
45
|
+
<%- unless missing.empty? %>
|
|
46
46
|
<h2>Missing Gem Documentation</h2>
|
|
47
47
|
|
|
48
48
|
<p>You are missing documentation for some of your installed gems.
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
<%- unless klass.extends.empty?
|
|
1
|
+
<%- unless klass.extends.empty? %>
|
|
2
2
|
<div id="extends-section" class="nav-section">
|
|
3
3
|
<h3>Extended With Modules</h3>
|
|
4
4
|
|
|
5
5
|
<ul class="link-list">
|
|
6
6
|
<%- klass.extends.each do |ext| %>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
<li>
|
|
8
|
+
<%- unless String === ext.module %>
|
|
9
|
+
<a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a>
|
|
10
|
+
<%- else %>
|
|
11
|
+
<span class="extend"><%= ext.name %></span>
|
|
12
|
+
<%- end %>
|
|
13
|
+
</li>
|
|
12
14
|
<%- end %>
|
|
13
15
|
</ul>
|
|
14
16
|
</div>
|
|
@@ -1,14 +1,16 @@
|
|
|
1
|
-
<%- unless klass.includes.empty?
|
|
1
|
+
<%- unless klass.includes.empty? %>
|
|
2
2
|
<div id="includes-section" class="nav-section">
|
|
3
3
|
<h3>Included Modules</h3>
|
|
4
4
|
|
|
5
5
|
<ul class="link-list">
|
|
6
6
|
<%- klass.includes.each do |inc| %>
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
<li>
|
|
8
|
+
<%- unless String === inc.module %>
|
|
9
|
+
<a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a>
|
|
10
|
+
<%- else %>
|
|
11
|
+
<span class="include"><%= inc.name %></span>
|
|
12
|
+
<%- end %>
|
|
13
|
+
</li>
|
|
12
14
|
<%- end %>
|
|
13
15
|
</ul>
|
|
14
16
|
</div>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<%- if defined?(current) %>
|
|
3
3
|
<%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name %>
|
|
4
4
|
<%- end %>
|
|
5
|
-
<%- unless simple_files.empty?
|
|
5
|
+
<%- unless simple_files.empty? %>
|
|
6
6
|
<div id="fileindex-section" class="nav-section">
|
|
7
7
|
<h3>Pages</h3>
|
|
8
8
|
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<%- f = files.shift %>
|
|
14
14
|
<%- if files.empty? %>
|
|
15
15
|
<li><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a></li>
|
|
16
|
-
<%- next
|
|
16
|
+
<%- next -%>
|
|
17
17
|
<%- end %>
|
|
18
18
|
<li><details<%= ' open' if dir == n %>><summary><%
|
|
19
19
|
if n == f.page_name
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
<%- comment = if current.respond_to? :comment_location
|
|
1
|
+
<%- comment = if current.respond_to? :comment_location
|
|
2
2
|
current.comment_location
|
|
3
3
|
else
|
|
4
4
|
current.comment
|
|
5
5
|
end
|
|
6
6
|
table = current.parse(comment).table_of_contents.dup
|
|
7
7
|
|
|
8
|
-
if table.length > 1
|
|
8
|
+
if table.length > 1 %>
|
|
9
9
|
<div class="nav-section">
|
|
10
10
|
<h3>Table of Contents</h3>
|
|
11
11
|
|
|
@@ -17,18 +17,18 @@
|
|
|
17
17
|
<%- level = table.first&.level %>
|
|
18
18
|
<%- while table.first && table.first.level >= level %>
|
|
19
19
|
<%- heading = table.shift %>
|
|
20
|
+
<li>
|
|
20
21
|
<%- if table.first.nil? || table.first.level <= heading.level %>
|
|
21
|
-
|
|
22
|
+
<% display_link.call heading %>
|
|
22
23
|
<%- else %>
|
|
23
|
-
<li>
|
|
24
24
|
<details open>
|
|
25
25
|
<summary><%- display_link.call heading %></summary>
|
|
26
26
|
<ul class="link-list" role="directory">
|
|
27
27
|
<% list_siblings.call %>
|
|
28
28
|
</ul>
|
|
29
29
|
</details>
|
|
30
|
-
</li>
|
|
31
30
|
<%- end %>
|
|
31
|
+
</li>
|
|
32
32
|
<%- end %>
|
|
33
33
|
<%- end %>
|
|
34
34
|
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
<% if namespace[:self] %>
|
|
27
27
|
<span><%= namespace[:name] %></span>
|
|
28
28
|
<% else %>
|
|
29
|
-
<a href="<%= namespace[:path] %>"><%= namespace[:name] %></a><span>::</span>
|
|
29
|
+
<a href="<%= namespace[:path] %>"><%= namespace[:name] %></a><span class="separator">::</span>
|
|
30
30
|
<% end %>
|
|
31
31
|
</li>
|
|
32
32
|
<% end %>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
|
|
44
44
|
<%- klass.each_section do |section, constants, attributes| %>
|
|
45
45
|
<section id="<%= section.aref %>" class="documentation-section anchor-link">
|
|
46
|
-
<%- if section.title
|
|
46
|
+
<%- if section.title %>
|
|
47
47
|
<header class="documentation-section-title">
|
|
48
48
|
<h2>
|
|
49
49
|
<%= section.title %>
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
</header>
|
|
55
55
|
<%- end %>
|
|
56
56
|
|
|
57
|
-
<%- if section.comment
|
|
57
|
+
<%- if section.comment %>
|
|
58
58
|
<div>
|
|
59
59
|
<%= section.description %>
|
|
60
60
|
</div>
|
|
61
61
|
<%- end %>
|
|
62
62
|
|
|
63
|
-
<%- unless constants.empty?
|
|
63
|
+
<%- unless constants.empty? %>
|
|
64
64
|
<section class="constants-list">
|
|
65
65
|
<header>
|
|
66
66
|
<h3>Constants</h3>
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
<dl>
|
|
69
69
|
<%- constants.each do |const| %>
|
|
70
70
|
<dt id="<%= const.name %>"><%= const.name %></dt>
|
|
71
|
-
<%- if const.comment
|
|
71
|
+
<%- if const.comment %>
|
|
72
72
|
<dd>
|
|
73
|
-
<%- if const.mixin_from
|
|
73
|
+
<%- if const.mixin_from %>
|
|
74
74
|
<div class="mixin-from">
|
|
75
75
|
Included from <a href="<%= klass.aref_to(const.mixin_from.path) %>"><%= const.mixin_from.full_name %></a>
|
|
76
76
|
</div>
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
</section>
|
|
86
86
|
<%- end %>
|
|
87
87
|
|
|
88
|
-
<%- unless attributes.empty?
|
|
88
|
+
<%- unless attributes.empty? %>
|
|
89
89
|
<section class="attribute-method-details method-section">
|
|
90
90
|
<header>
|
|
91
91
|
<h3>Attributes</h3>
|
|
@@ -101,12 +101,12 @@
|
|
|
101
101
|
</div>
|
|
102
102
|
|
|
103
103
|
<div class="method-description">
|
|
104
|
-
<%- if attrib.mixin_from
|
|
104
|
+
<%- if attrib.mixin_from %>
|
|
105
105
|
<div class="mixin-from">
|
|
106
106
|
<%= attrib.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(attrib.mixin_from.path) %>"><%= attrib.mixin_from.full_name %></a>
|
|
107
107
|
</div>
|
|
108
108
|
<%- end %>
|
|
109
|
-
<%- if attrib.comment
|
|
109
|
+
<%- if attrib.comment %>
|
|
110
110
|
<%= attrib.description.strip %>
|
|
111
111
|
<%- else %>
|
|
112
112
|
<p class="missing-docs">(Not documented)</p>
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
<%- methods.each do |method| %>
|
|
130
130
|
<div id="<%= method.aref %>" class="method-detail anchor-link <%= method.is_alias_for ? "method-alias" : '' %>">
|
|
131
131
|
<div class="method-header">
|
|
132
|
-
<%- if (call_seq = method.call_seq)
|
|
132
|
+
<%- if (call_seq = method.call_seq) %>
|
|
133
133
|
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
|
|
134
134
|
<div class="method-heading">
|
|
135
135
|
<a href="#<%= method.aref %>" title="Link to this method">
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
</a>
|
|
142
142
|
</div>
|
|
143
143
|
<%- end %>
|
|
144
|
-
<%- elsif method.has_call_seq?
|
|
144
|
+
<%- elsif method.has_call_seq? %>
|
|
145
145
|
<div class="method-heading">
|
|
146
146
|
<a href="#<%= method.aref %>" title="Link to this method">
|
|
147
147
|
<span class="method-name"><%= h method.name %></span>
|
|
@@ -168,19 +168,19 @@
|
|
|
168
168
|
</div>
|
|
169
169
|
<%- end %>
|
|
170
170
|
|
|
171
|
-
<%- unless method.skip_description?
|
|
171
|
+
<%- unless method.skip_description? %>
|
|
172
172
|
<div class="method-description">
|
|
173
|
-
<%- if method.mixin_from
|
|
173
|
+
<%- if method.mixin_from %>
|
|
174
174
|
<div class="mixin-from">
|
|
175
175
|
<%= method.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(method.mixin_from.path) %>"><%= method.mixin_from.full_name %></a>
|
|
176
176
|
</div>
|
|
177
177
|
<%- end %>
|
|
178
|
-
<%- if method.comment
|
|
178
|
+
<%- if method.comment %>
|
|
179
179
|
<%= method.description.strip %>
|
|
180
180
|
<%- else %>
|
|
181
181
|
<p class="missing-docs">(Not documented)</p>
|
|
182
182
|
<%- end %>
|
|
183
|
-
<%- if method.calls_super
|
|
183
|
+
<%- if method.calls_super %>
|
|
184
184
|
<div class="method-calls-super">
|
|
185
185
|
Calls superclass method
|
|
186
186
|
<%=
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
</div>
|
|
193
193
|
<%- end %>
|
|
194
194
|
|
|
195
|
-
<%- unless method.aliases.empty?
|
|
195
|
+
<%- unless method.aliases.empty? %>
|
|
196
196
|
<div class="aliases">
|
|
197
197
|
Also aliased as: <%= method.aliases.map do |aka|
|
|
198
198
|
if aka.parent then # HACK lib/rexml/encodings
|
|
@@ -204,7 +204,7 @@
|
|
|
204
204
|
</div>
|
|
205
205
|
<%- end %>
|
|
206
206
|
|
|
207
|
-
<%- if method.is_alias_for
|
|
207
|
+
<%- if method.is_alias_for %>
|
|
208
208
|
<div class="aliases">
|
|
209
209
|
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
|
|
210
210
|
</div>
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<h1 class="class"><%= h @title %></h1>
|
|
15
15
|
|
|
16
16
|
<%- simple_files = @files.select { |f| f.text? } %>
|
|
17
|
-
<%- unless simple_files.empty?
|
|
17
|
+
<%- unless simple_files.empty? %>
|
|
18
18
|
<h2 id="pages">Pages</h2>
|
|
19
19
|
<ul>
|
|
20
20
|
<%- simple_files.sort.each do |file| %>
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
<%
|
|
24
24
|
# HACK table_of_contents should not exist on Document
|
|
25
25
|
table = file.parse(file.comment).table_of_contents
|
|
26
|
-
unless table.empty?
|
|
26
|
+
unless table.empty? %>
|
|
27
27
|
<ul>
|
|
28
28
|
<%- table.each do |heading| %>
|
|
29
29
|
<li><a href="<%= h file.path %>#<%= heading.aref %>"><%= heading.plain_html %></a></li>
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
table.concat klass.parse(klass.comment_location).table_of_contents
|
|
45
45
|
table.concat klass.section_contents
|
|
46
46
|
|
|
47
|
-
unless table.empty?
|
|
47
|
+
unless table.empty? %>
|
|
48
48
|
<ul>
|
|
49
49
|
<%- table.each do |item| %>
|
|
50
50
|
<%- label = item.respond_to?(:label) ? item.label(klass) : item.aref %>
|