rdoc 6.15.0 → 6.15.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 737b80cad7809fc0b20efe70270867bcc3a7f3ae7c5c0e1f818769b8ab40c7cc
4
- data.tar.gz: 6754787e054cab04658a068f8e3a2be8cacb1473991d91a330beb0118bf22930
3
+ metadata.gz: ed79e2cda1c5cd7113829e3fcfbbece5c1d5332e9046778c2581d28059afd9e7
4
+ data.tar.gz: cc77a3249231ee94df7d06090d9a683e0c7f71f5924186e2f0dcae5b01ec5b74
5
5
  SHA512:
6
- metadata.gz: fad664b000fbb058f96f2e7f032ba767b86213a21380cf584d30ff34710acc5c383bc5053b2a06e3e7190c9f4188d397ba7bc9be226d82231fd2bad76c046258
7
- data.tar.gz: 5afe676ff848a49515c6fba65fc5e8a4b765c5e52af6c0128caa36a7a1253a41fc3ac0b0ef2098f74fd69269e285c8d3ec67128cc631b60c97062c5c9fe7cbc0
6
+ metadata.gz: 43bd516f9ffb4f33e76c6186c8b0429525d4729172a25de895a2f1d69f7c523bdc8868c42dc55dc17863f6daa927a56d1aaefbb9edc5519a4885f2a5b60e0cbf
7
+ data.tar.gz: 368780ba1a40869aa6a26e2a5734d13bb5ec25e4d47dcea78cb0de2c117bad7b8e964ea69b857aadc799f492f72d51a7d68a7259f357c2d23c9a13064c33ce3b
@@ -1,5 +1,5 @@
1
1
  <footer id="validator-badges" role="contentinfo">
2
- <p><a href="https://validator.w3.org/check/referer">Validate</a>
3
- <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> <%= RDoc::VERSION %>.
4
- <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
2
+ <p><a href="https://validator.w3.org/check/referer">Validate</a></p>
3
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> <%= RDoc::VERSION %>.</p>
4
+ <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.</p>
5
5
  </footer>
@@ -1,34 +1,34 @@
1
1
  <meta charset="<%= @options.charset %>">
2
- <meta name="viewport" content="width=device-width, initial-scale=1" />
2
+ <meta name="viewport" content="width=device-width, initial-scale=1">
3
3
 
4
4
  <title><%= h @title %></title>
5
5
 
6
- <%- if defined?(klass) -%>
6
+ <%- if defined?(klass) %>
7
7
  <meta name="keywords" content="ruby,<%= h "#{klass.type},#{klass.full_name}" %>">
8
8
 
9
- <%- if klass.comment.empty? -%>
9
+ <%- if klass.comment.empty? %>
10
10
  <meta name="description" content="Documentation for the <%= h "#{klass.full_name} #{klass.type}" %>">
11
- <%- else -%>
11
+ <%- else %>
12
12
  <meta name="description" content="<%= h "#{klass.type} #{klass.full_name}: #{excerpt(klass.comment)}" %>">
13
- <%- end -%>
14
- <%- elsif defined?(file) -%>
13
+ <%- end %>
14
+ <%- elsif defined?(file) %>
15
15
  <meta name="keywords" content="ruby,documentation,<%= h file.page_name %>">
16
16
  <meta name="description" content="<%= h "#{file.page_name}: #{excerpt(file.comment)}" %>">
17
- <%- elsif @title -%>
17
+ <%- elsif @title %>
18
18
  <meta name="keywords" content="ruby,documentation,<%= h @title %>">
19
19
 
20
20
  <%- if @options.main_page and
21
21
  main_page = @files.find { |f| f.full_name == @options.main_page } then %>
22
22
  <meta name="description" content="<%= h "#{@title}: #{excerpt(main_page.comment)}" %>">
23
- <%- else -%>
23
+ <%- else %>
24
24
  <meta name="description" content="Documentation for <%= h @title %>">
25
- <%- end -%>
26
- <%- end -%>
25
+ <%- end %>
26
+ <%- end %>
27
27
 
28
- <%- if canonical_url = @options.canonical_root -%>
28
+ <%- if canonical_url = @options.canonical_root %>
29
29
  <% canonical_url = current.canonical_url if defined?(current) %>
30
30
  <link rel="canonical" href="<%= canonical_url %>">
31
- <%- end -%>
31
+ <%- end %>
32
32
 
33
33
  <script type="text/javascript">
34
34
  var rdoc_rel_prefix = "<%= h asset_rel_prefix %>/";
@@ -43,6 +43,6 @@
43
43
 
44
44
  <link href="<%= h asset_rel_prefix %>/css/fonts.css" rel="stylesheet">
45
45
  <link href="<%= h asset_rel_prefix %>/css/rdoc.css" rel="stylesheet">
46
- <%- @options.template_stylesheets.each do |stylesheet| -%>
46
+ <%- @options.template_stylesheets.each do |stylesheet| %>
47
47
  <link href="<%= h asset_rel_prefix %>/<%= File.basename stylesheet %>" rel="stylesheet">
48
- <%- end -%>
48
+ <%- end %>
@@ -3,13 +3,13 @@
3
3
  <h3>Extended With Modules</h3>
4
4
 
5
5
  <ul class="link-list">
6
- <%- klass.extends.each do |ext| -%>
7
- <%- unless String === ext.module then -%>
8
- <li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a>
9
- <%- else -%>
10
- <li><span class="extend"><%= ext.name %></span>
11
- <%- end -%>
12
- <%- end -%>
6
+ <%- klass.extends.each do |ext| %>
7
+ <%- unless String === ext.module then %>
8
+ <li><a class="extend" href="<%= klass.aref_to ext.module.path %>"><%= ext.module.full_name %></a></li>
9
+ <%- else %>
10
+ <li><span class="extend"><%= ext.name %></span></li>
11
+ <%- end %>
12
+ <%- end %>
13
13
  </ul>
14
14
  </div>
15
- <%- end -%>
15
+ <%- end %>
@@ -3,13 +3,13 @@
3
3
  <h3>Included Modules</h3>
4
4
 
5
5
  <ul class="link-list">
6
- <%- klass.includes.each do |inc| -%>
7
- <%- unless String === inc.module then -%>
8
- <li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a>
9
- <%- else -%>
10
- <li><span class="include"><%= inc.name %></span>
11
- <%- end -%>
12
- <%- end -%>
6
+ <%- klass.includes.each do |inc| %>
7
+ <%- unless String === inc.module then %>
8
+ <li><a class="include" href="<%= klass.aref_to inc.module.path %>"><%= inc.module.full_name %></a></li>
9
+ <%- else %>
10
+ <li><span class="include"><%= inc.name %></span></li>
11
+ <%- end %>
12
+ <%- end %>
13
13
  </ul>
14
14
  </div>
15
- <%- end -%>
15
+ <%- end %>
@@ -2,14 +2,15 @@
2
2
  <h3>Documentation</h3>
3
3
 
4
4
  <ul>
5
- <%- installed.each do |name, href, exists, type, _| -%>
6
- <%- next if type == :extra -%>
5
+ <%- installed.each do |name, href, exists, type, _| %>
6
+ <%- next if type == :extra %>
7
7
  <li class="folder">
8
- <%- if exists then -%>
8
+ <%- if exists then %>
9
9
  <a href="<%= href %>"><%= h name %></a>
10
- <%- else -%>
10
+ <%- else %>
11
11
  <%= h name %>
12
- <%- end -%>
13
- <%- end -%>
12
+ <%- end %>
13
+ </li>
14
+ <%- end %>
14
15
  </ul>
15
16
  </div>
@@ -2,9 +2,9 @@
2
2
  <div class="nav-section">
3
3
  <h3>Class Methods</h3>
4
4
  <ul class="link-list" role="directory">
5
- <%- class_methods.each do |meth| -%>
6
- <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name -%></a></li>
7
- <%- end -%>
5
+ <%- class_methods.each do |meth| %>
6
+ <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name %></a></li>
7
+ <%- end %>
8
8
  </ul>
9
9
  </div>
10
10
  <% end %>
@@ -13,9 +13,9 @@
13
13
  <div class="nav-section">
14
14
  <h3>Instance Methods</h3>
15
15
  <ul class="link-list" role="directory">
16
- <%- instance_methods.each do |meth| -%>
17
- <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name -%></a></li>
18
- <%- end -%>
16
+ <%- instance_methods.each do |meth| %>
17
+ <li <%- if meth.calls_super %>class="calls-super" <%- end %>><a href="#<%= meth.aref %>"><%= h meth.name %></a></li>
18
+ <%- end %>
19
19
  </ul>
20
20
  </div>
21
21
  <% end %>
@@ -1,32 +1,32 @@
1
1
  <%- simple_files = @files.select { |f| f.text? } %>
2
- <%- if defined?(current) -%>
3
- <%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name -%>
4
- <%- end -%>
5
- <%- unless simple_files.empty? then -%>
2
+ <%- if defined?(current) %>
3
+ <%- dir = current.full_name[%r{\A[^/]+(?=/)}] || current.page_name %>
4
+ <%- end %>
5
+ <%- unless simple_files.empty? then %>
6
6
  <div id="fileindex-section" class="nav-section">
7
7
  <h3>Pages</h3>
8
8
 
9
9
  <ul class="link-list">
10
- <%- simple_files.group_by do |f| -%>
11
- <%- f.full_name[%r{\A[^/]+(?=/)}] || f.page_name -%>
12
- <%- end.each do |n, files| -%>
13
- <%- f = files.shift -%>
14
- <%- if files.empty? -%>
15
- <li><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a>
16
- <%- next -%>
17
- <%- end -%>
18
- <li><details<% if dir == n %> open<% end %>><summary><%
10
+ <%- simple_files.group_by do |f|
11
+ f.full_name[%r{\A[^/]+(?=/)}] || f.page_name
12
+ end.each do |n, files| %>
13
+ <%- f = files.shift %>
14
+ <%- if files.empty? %>
15
+ <li><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a></li>
16
+ <%- next %>
17
+ <%- end %>
18
+ <li><details<%= ' open' if dir == n %>><summary><%
19
19
  if n == f.page_name
20
20
  %><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h n %></a><%
21
21
  else
22
22
  %><%= h n %><% files.unshift(f)
23
23
  end %></summary>
24
24
  <ul class="link-list">
25
- <%- files.each do |f| -%>
26
- <li><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a>
27
- <%- end -%>
28
- </ul></details>
29
- <%- end -%>
25
+ <%- files.each do |f| %>
26
+ <li><a href="<%= rel_prefix %>/<%= h f.path %>"><%= h f.page_name %></a></li>
27
+ <%- end %>
28
+ </ul></details></li>
29
+ <%- end %>
30
30
  </ul>
31
31
  </div>
32
- <%- end -%>
32
+ <%- end %>
@@ -1,6 +1,6 @@
1
- <%- if klass.type == 'class' && (ancestors = klass.super_classes).any? -%>
1
+ <%- if klass.type == 'class' && (ancestors = klass.super_classes).any? %>
2
2
  <div id="parent-class-section" class="nav-section">
3
3
  <h3>Ancestors</h3>
4
4
  <%= generate_ancestor_list(ancestors, klass) %>
5
5
  </div>
6
- <%- end -%>
6
+ <%- end %>
@@ -3,9 +3,9 @@
3
3
  <h3>Sections</h3>
4
4
 
5
5
  <ul class="link-list" role="directory">
6
- <%- klass.sort_sections.each do |section| -%>
6
+ <%- klass.sort_sections.each do |section| %>
7
7
  <li><a href="#<%= section.aref %>"><%= h section.title %></a></li>
8
- <%- end -%>
8
+ <%- end %>
9
9
  </ul>
10
10
  </div>
11
- <%- end -%>
11
+ <%- end %>
@@ -9,31 +9,31 @@
9
9
  <div class="nav-section">
10
10
  <h3>Table of Contents</h3>
11
11
 
12
- <%- display_link = proc do |heading| -%>
12
+ <%- display_link = proc do |heading| %>
13
13
  <a href="#<%= heading.label current %>"><%= heading.plain_html %></a>
14
- <%- end -%>
14
+ <%- end %>
15
15
 
16
- <%- list_siblings = proc do -%>
17
- <%- level = table.first&.level -%>
18
- <%- while table.first && table.first.level >= level -%>
19
- <%- heading = table.shift -%>
20
- <%- if table.first.nil? || table.first.level <= heading.level -%>
21
- <li><% display_link.call heading -%>
22
- <%- else -%>
16
+ <%- list_siblings = proc do %>
17
+ <%- level = table.first&.level %>
18
+ <%- while table.first && table.first.level >= level %>
19
+ <%- heading = table.shift %>
20
+ <%- if table.first.nil? || table.first.level <= heading.level %>
21
+ <li><% display_link.call heading %></li>
22
+ <%- else %>
23
23
  <li>
24
24
  <details open>
25
- <summary><%- display_link.call heading -%></summary>
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
30
  </li>
31
- <%- end -%>
32
- <%- end -%>
33
- <%- end -%>
31
+ <%- end %>
32
+ <%- end %>
33
+ <%- end %>
34
34
 
35
35
  <ul class="link-list" role="directory">
36
36
  <% list_siblings.call %>
37
37
  </ul>
38
38
  </div>
39
- <%- end -%>
39
+ <%- end %>
@@ -17,10 +17,10 @@
17
17
  <%= render '_footer.rhtml' %>
18
18
  </nav>
19
19
 
20
- <main role="main" aria-labelledby="<%=h klass.aref %>">
20
+ <main role="main" aria-labelledby="<%= h klass.aref %>">
21
21
  <%# If nesting level is 1, breadcrumb list is not needed %>
22
22
  <% if breadcrumb.size > 1 %>
23
- <ol role="navigation" aria-label="breadcrumb" class="breadcrumb">
23
+ <ol role="navigation" aria-label="Breadcrumb navigation" class="breadcrumb">
24
24
  <% breadcrumb.each do |namespace| %>
25
25
  <li>
26
26
  <% if namespace[:self] %>
@@ -33,7 +33,7 @@
33
33
  </ol>
34
34
  <% end %>
35
35
 
36
- <h1 id="<%=h klass.aref %>" class="anchor-link <%= klass.type %>">
36
+ <h1 id="<%= h klass.aref %>" class="anchor-link <%= klass.type %>">
37
37
  <%= klass.type %> <%= klass.full_name %>
38
38
  </h1>
39
39
 
@@ -41,9 +41,9 @@
41
41
  <%= klass.description %>
42
42
  </section>
43
43
 
44
- <%- klass.each_section do |section, constants, attributes| -%>
44
+ <%- klass.each_section do |section, constants, attributes| %>
45
45
  <section id="<%= section.aref %>" class="documentation-section anchor-link">
46
- <%- if section.title then -%>
46
+ <%- if section.title then %>
47
47
  <header class="documentation-section-title">
48
48
  <h2>
49
49
  <%= section.title %>
@@ -52,45 +52,46 @@
52
52
  <a href="#top">&uarr; top</a>
53
53
  </span>
54
54
  </header>
55
- <%- end -%>
55
+ <%- end %>
56
56
 
57
- <%- if section.comment then -%>
57
+ <%- if section.comment then %>
58
58
  <div>
59
59
  <%= section.description %>
60
60
  </div>
61
- <%- end -%>
61
+ <%- end %>
62
62
 
63
- <%- unless constants.empty? then -%>
63
+ <%- unless constants.empty? then %>
64
64
  <section class="constants-list">
65
65
  <header>
66
66
  <h3>Constants</h3>
67
67
  </header>
68
68
  <dl>
69
- <%- constants.each do |const| -%>
70
- <dt id="<%= const.name %>"><%= const.name %>
71
- <%- if const.comment then -%>
69
+ <%- constants.each do |const| %>
70
+ <dt id="<%= const.name %>"><%= const.name %></dt>
71
+ <%- if const.comment then %>
72
72
  <dd>
73
- <%- if const.mixin_from then -%>
73
+ <%- if const.mixin_from then %>
74
74
  <div class="mixin-from">
75
- Included from <a href="<%= klass.aref_to(const.mixin_from.path)%>"><%= const.mixin_from.full_name %></a>
75
+ Included from <a href="<%= klass.aref_to(const.mixin_from.path) %>"><%= const.mixin_from.full_name %></a>
76
76
  </div>
77
- <%- end -%>
77
+ <%- end %>
78
78
  <%= const.description.strip %>
79
- <%- else -%>
80
- <dd class="missing-docs">(Not documented)
81
- <%- end -%>
82
- <%- end -%>
79
+ </dd>
80
+ <%- else %>
81
+ <dd class="missing-docs">(Not documented)</dd>
82
+ <%- end %>
83
+ <%- end %>
83
84
  </dl>
84
85
  </section>
85
- <%- end -%>
86
+ <%- end %>
86
87
 
87
- <%- unless attributes.empty? then -%>
88
- <section class="attribute-method-details" class="method-section">
88
+ <%- unless attributes.empty? then %>
89
+ <section class="attribute-method-details method-section">
89
90
  <header>
90
91
  <h3>Attributes</h3>
91
92
  </header>
92
93
 
93
- <%- attributes.each do |attrib| -%>
94
+ <%- attributes.each do |attrib| %>
94
95
  <div id="<%= attrib.aref %>" class="method-detail anchor-link">
95
96
  <div class="method-heading attribute-method-heading">
96
97
  <a href="#<%= attrib.aref %>" title="Link to this attribute">
@@ -100,21 +101,21 @@
100
101
  </div>
101
102
 
102
103
  <div class="method-description">
103
- <%- if attrib.mixin_from then -%>
104
+ <%- if attrib.mixin_from then %>
104
105
  <div class="mixin-from">
105
- <%= attrib.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(attrib.mixin_from.path)%>"><%= attrib.mixin_from.full_name %></a>
106
+ <%= attrib.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(attrib.mixin_from.path) %>"><%= attrib.mixin_from.full_name %></a>
106
107
  </div>
107
- <%- end -%>
108
- <%- if attrib.comment then -%>
108
+ <%- end %>
109
+ <%- if attrib.comment then %>
109
110
  <%= attrib.description.strip %>
110
- <%- else -%>
111
- <p class="missing-docs">(Not documented)
112
- <%- end -%>
111
+ <%- else %>
112
+ <p class="missing-docs">(Not documented)</p>
113
+ <%- end %>
113
114
  </div>
114
115
  </div>
115
- <%- end -%>
116
+ <%- end %>
116
117
  </section>
117
- <%- end -%>
118
+ <%- end %>
118
119
 
119
120
  <%- klass.methods_by_type(section).each do |type, visibilities|
120
121
  next if visibilities.empty?
@@ -125,11 +126,11 @@
125
126
  <h3><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</h3>
126
127
  </header>
127
128
 
128
- <%- methods.each do |method| -%>
129
+ <%- methods.each do |method| %>
129
130
  <div id="<%= method.aref %>" class="method-detail anchor-link <%= method.is_alias_for ? "method-alias" : '' %>">
130
131
  <div class="method-header">
131
- <%- if (call_seq = method.call_seq) then -%>
132
- <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| -%>
132
+ <%- if (call_seq = method.call_seq) then %>
133
+ <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
133
134
  <div class="method-heading">
134
135
  <a href="#<%= method.aref %>" title="Link to this method">
135
136
  <span class="method-callseq">
@@ -139,49 +140,49 @@
139
140
  </span>
140
141
  </a>
141
142
  </div>
142
- <%- end -%>
143
- <%- elsif method.has_call_seq? then -%>
143
+ <%- end %>
144
+ <%- elsif method.has_call_seq? then %>
144
145
  <div class="method-heading">
145
146
  <a href="#<%= method.aref %>" title="Link to this method">
146
147
  <span class="method-name"><%= h method.name %></span>
147
148
  </a>
148
149
  </div>
149
- <%- else -%>
150
+ <%- else %>
150
151
  <div class="method-heading">
151
152
  <a href="#<%= method.aref %>" title="Link to this method">
152
153
  <span class="method-name"><%= h method.name %></span>
153
154
  <span class="method-args"><%= h method.param_seq %></span>
154
155
  </a>
155
156
  </div>
156
- <%- end -%>
157
+ <%- end %>
157
158
  </div>
158
159
 
159
- <%- if method.token_stream -%>
160
+ <%- if method.token_stream %>
160
161
  <div class="method-controls">
161
162
  <details class="method-source-toggle">
162
163
  <summary>Source</summary>
163
164
  </details>
164
165
  </div>
165
- <%- end -%>
166
+ <%- end %>
166
167
 
167
- <%- unless method.skip_description? then -%>
168
+ <%- unless method.skip_description? then %>
168
169
  <div class="method-description">
169
- <%- if method.token_stream then -%>
170
+ <%- if method.token_stream then %>
170
171
  <div class="method-source-code" id="<%= method.html_name %>-source">
171
172
  <pre><%= method.markup_code %></pre>
172
173
  </div>
173
- <%- end -%>
174
- <%- if method.mixin_from then -%>
174
+ <%- end %>
175
+ <%- if method.mixin_from then %>
175
176
  <div class="mixin-from">
176
- <%= method.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(method.mixin_from.path)%>"><%= method.mixin_from.full_name %></a>
177
+ <%= method.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(method.mixin_from.path) %>"><%= method.mixin_from.full_name %></a>
177
178
  </div>
178
- <%- end -%>
179
- <%- if method.comment then -%>
179
+ <%- end %>
180
+ <%- if method.comment then %>
180
181
  <%= method.description.strip %>
181
- <%- else -%>
182
- <p class="missing-docs">(Not documented)
183
- <%- end -%>
184
- <%- if method.calls_super then -%>
182
+ <%- else %>
183
+ <p class="missing-docs">(Not documented)</p>
184
+ <%- end %>
185
+ <%- if method.calls_super then %>
185
186
  <div class="method-calls-super">
186
187
  Calls superclass method
187
188
  <%=
@@ -189,11 +190,11 @@
189
190
  method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil
190
191
  %>
191
192
  </div>
192
- <%- end -%>
193
+ <%- end %>
193
194
  </div>
194
- <%- end -%>
195
+ <%- end %>
195
196
 
196
- <%- unless method.aliases.empty? then -%>
197
+ <%- unless method.aliases.empty? then %>
197
198
  <div class="aliases">
198
199
  Also aliased as: <%= method.aliases.map do |aka|
199
200
  if aka.parent then # HACK lib/rexml/encodings
@@ -203,19 +204,20 @@
203
204
  end
204
205
  end.join ", " %>
205
206
  </div>
206
- <%- end -%>
207
+ <%- end %>
207
208
 
208
- <%- if method.is_alias_for then -%>
209
+ <%- if method.is_alias_for then %>
209
210
  <div class="aliases">
210
211
  Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
211
212
  </div>
212
- <%- end -%>
213
+ <%- end %>
213
214
  </div>
214
215
 
215
- <%- end -%>
216
+ <%- end %>
216
217
  </section>
217
218
  <%- end
218
219
  end %>
219
220
  </section>
220
- <%- end -%>
221
+ <%- end %>
221
222
  </main>
223
+ </body>
@@ -17,7 +17,8 @@
17
17
  <main role="main">
18
18
  <%- if @main_page %>
19
19
  <%= @main_page.description %>
20
- <%- else -%>
21
- <p>This is the API documentation for <%= h @title %>.
22
- <%- end -%>
20
+ <%- else %>
21
+ <p>This is the API documentation for <%= h @title %>.</p>
22
+ <%- end %>
23
23
  </main>
24
+ </body>
@@ -13,6 +13,7 @@
13
13
  <%= render '_footer.rhtml' %>
14
14
  </nav>
15
15
 
16
- <main role="main" aria-label="Page <%=h file.full_name%>">
16
+ <main role="main" aria-label="Page <%= h file.full_name %>">
17
17
  <%= file.description %>
18
18
  </main>
19
+ </body>
@@ -16,5 +16,6 @@
16
16
  <main role="main">
17
17
  <h1>Not Found</h1>
18
18
 
19
- <p><%= message %>
19
+ <p><%= message %></p>
20
20
  </main>
21
+ </body>
@@ -20,46 +20,46 @@
20
20
  <h1>Local RDoc Documentation</h1>
21
21
 
22
22
  <p>Here you can browse local documentation from the ruby standard library and
23
- your installed gems.
23
+ your installed gems.</p>
24
24
 
25
- <%- extra_dirs = installed.select { |_, _, _, type,| type == :extra } -%>
26
- <%- unless extra_dirs.empty? -%>
25
+ <%- extra_dirs = installed.select { |_, _, _, type,| type == :extra } %>
26
+ <%- unless extra_dirs.empty? %>
27
27
  <h2>Extra Documentation Directories</h2>
28
28
 
29
29
  <p>The following additional documentation directories are available:</p>
30
30
 
31
31
  <ol>
32
- <%- extra_dirs.each do |name, href, exists, _, path| -%>
32
+ <%- extra_dirs.each do |name, href, exists, _, path| %>
33
33
  <li>
34
- <%- if exists -%>
34
+ <%- if exists %>
35
35
  <a href="<%= href %>"><%= h name %></a> (<%= h path %>)
36
- <%- else -%>
36
+ <%- else %>
37
37
  <%= h name %> (<%= h path %>; <i>not available</i>)
38
- <%- end -%>
38
+ <%- end %>
39
39
  </li>
40
- <%- end -%>
40
+ <%- end %>
41
41
  </ol>
42
- <%- end -%>
42
+ <%- end %>
43
43
 
44
- <%- gems = installed.select { |_, _, _, type,| type == :gem } -%>
45
- <%- missing = gems.reject { |_, _, exists,| exists } -%>
46
- <%- unless missing.empty? then -%>
44
+ <%- gems = installed.select { |_, _, _, type,| type == :gem } %>
45
+ <%- missing = gems.reject { |_, _, exists,| exists } %>
46
+ <%- unless missing.empty? %>
47
47
  <h2>Missing Gem Documentation</h2>
48
48
 
49
49
  <p>You are missing documentation for some of your installed gems.
50
50
  You can install missing documentation for gems by running
51
51
  <kbd>gem rdoc --all</kbd>. After installing the missing documentation you
52
52
  only need to reload this page. The newly created documentation will
53
- automatically appear.
53
+ automatically appear.</p>
54
54
 
55
55
  <p>You can also install documentation for a specific gem by running one of
56
- the following commands.
56
+ the following commands.</p>
57
57
 
58
58
  <ul>
59
- <%- names = missing.map { |name,| name.sub(/-([^-]*)$/, '') }.uniq -%>
60
- <%- names.each do |name| -%>
61
- <li><kbd>gem rdoc <%=h name %></kbd>
62
- <%- end -%>
59
+ <%- missing.map { |name,| name.sub(/-([^-]*)$/, '') }.uniq.each do |name| %>
60
+ <li><kbd>gem rdoc <%= h name %></kbd></li>
61
+ <%- end %>
63
62
  </ul>
64
- <%- end -%>
63
+ <%- end %>
65
64
  </main>
65
+ </body>
@@ -13,11 +13,11 @@
13
13
  <main role="main">
14
14
  <h1 class="class"><%= h @title %></h1>
15
15
 
16
- <%- simple_files = @files.select { |f| f.text? } -%>
17
- <%- unless simple_files.empty? then -%>
16
+ <%- simple_files = @files.select { |f| f.text? } %>
17
+ <%- unless simple_files.empty? then %>
18
18
  <h2 id="pages">Pages</h2>
19
19
  <ul>
20
- <%- simple_files.sort.each do |file| -%>
20
+ <%- simple_files.sort.each do |file| %>
21
21
  <li class="file">
22
22
  <a href="<%= h file.path %>"><%= h file.page_name %></a>
23
23
  <%
@@ -25,19 +25,19 @@
25
25
  table = file.parse(file.comment).table_of_contents
26
26
  unless table.empty? then %>
27
27
  <ul>
28
- <%- table.each do |heading| -%>
29
- <li><a href="<%= h file.path %>#<%= heading.aref %>"><%= heading.plain_html %></a>
30
- <%- end -%>
28
+ <%- table.each do |heading| %>
29
+ <li><a href="<%= h file.path %>#<%= heading.aref %>"><%= heading.plain_html %></a></li>
30
+ <%- end %>
31
31
  </ul>
32
- <%- end -%>
32
+ <%- end %>
33
33
  </li>
34
- <%- end -%>
34
+ <%- end %>
35
35
  </ul>
36
- <%- end -%>
36
+ <%- end %>
37
37
 
38
38
  <h2 id="classes">Classes and Modules</h2>
39
39
  <ul>
40
- <%- @modsort.each do |klass| -%>
40
+ <%- @modsort.each do |klass| %>
41
41
  <li class="<%= klass.type %>">
42
42
  <a href="<%= klass.path %>"><%= klass.full_name %></a>
43
43
  <%- table = []
@@ -46,14 +46,14 @@
46
46
 
47
47
  unless table.empty? then %>
48
48
  <ul>
49
- <%- table.each do |item| -%>
50
- <%- label = item.respond_to?(:label) ? item.label(klass) : item.aref -%>
51
- <li><a href="<%= klass.path %>#<%= label %>"><%= item.plain_html %></a>
52
- <%- end -%>
49
+ <%- table.each do |item| %>
50
+ <%- label = item.respond_to?(:label) ? item.label(klass) : item.aref %>
51
+ <li><a href="<%= klass.path %>#<%= label %>"><%= item.plain_html %></a></li>
52
+ <%- end %>
53
53
  </ul>
54
- <%- end -%>
54
+ <%- end %>
55
55
  </li>
56
- <%- end -%>
56
+ <%- end %>
57
57
  </ul>
58
58
 
59
59
  <h2 id="methods">Methods</h2>
@@ -65,6 +65,8 @@
65
65
  <a href="<%= method.path %>"><%= h method.pretty_name %></a>
66
66
  &mdash;
67
67
  <span class="container"><%= method.parent.full_name %></span>
68
- <%- end -%>
68
+ </li>
69
+ <%- end %>
69
70
  </ul>
70
71
  </main>
72
+ </body>
@@ -29,7 +29,7 @@ Searcher.prototype = new function() {
29
29
 
30
30
  var results =
31
31
  performSearch(_this.data, regexps, queries, highlighters, state);
32
- var hasMore = (state.limit > 0 && state.pass < 4);
32
+ var hasMore = (state.limit > 0 && state.pass < 6);
33
33
 
34
34
  triggerResults.call(_this, results, !hasMore);
35
35
  if (hasMore) {
@@ -85,6 +85,30 @@ Searcher.prototype = new function() {
85
85
 
86
86
  /* ----- Mathchers ------ */
87
87
 
88
+ /*
89
+ * This record matches if both the index and longIndex exactly equal queries[0]
90
+ * and the record matches all of the regexps. This ensures top-level exact matches
91
+ * like "String" are prioritized over nested classes like "Gem::Module::String".
92
+ */
93
+ function matchPassExact(index, longIndex, queries) {
94
+ return index == queries[0] && longIndex == queries[0];
95
+ }
96
+
97
+ /*
98
+ * This record matches if the index without "()" exactly equals queries[0].
99
+ * This prioritizes methods like "attribute()" when searching for "attribute".
100
+ */
101
+ function matchPassExactMethod(index, longIndex, queries, regexps) {
102
+ var indexWithoutParens = index.replace(/\(\)$/, '');
103
+ if (indexWithoutParens != queries[0]) return false;
104
+ if (index === indexWithoutParens) return false; // Not a method (no parens to remove)
105
+ for (var i=1, l = regexps.length; i < l; i++) {
106
+ if (!index.match(regexps[i]) && !longIndex.match(regexps[i]))
107
+ return false;
108
+ };
109
+ return true;
110
+ }
111
+
88
112
  /*
89
113
  * This record matches if the index starts with queries[0] and the record
90
114
  * matches all of the regexps
@@ -192,17 +216,26 @@ Searcher.prototype = new function() {
192
216
  var togo = CHUNK_SIZE;
193
217
  var matchFunc, hltFunc;
194
218
 
195
- while (state.pass < 4 && state.limit > 0 && togo > 0) {
219
+ var isLowercaseQuery = queries[0] === queries[0].toLowerCase();
220
+
221
+ while (state.pass < 6 && state.limit > 0 && togo > 0) {
222
+ // When query is lowercase, prioritize methods over classes
196
223
  if (state.pass == 0) {
197
- matchFunc = matchPassBeginning;
224
+ matchFunc = isLowercaseQuery ? matchPassExactMethod : matchPassExact;
198
225
  hltFunc = highlightQuery;
199
226
  } else if (state.pass == 1) {
200
- matchFunc = matchPassLongIndex;
227
+ matchFunc = isLowercaseQuery ? matchPassExact : matchPassExactMethod;
201
228
  hltFunc = highlightQuery;
202
229
  } else if (state.pass == 2) {
203
- matchFunc = matchPassContains;
230
+ matchFunc = matchPassBeginning;
204
231
  hltFunc = highlightQuery;
205
232
  } else if (state.pass == 3) {
233
+ matchFunc = matchPassLongIndex;
234
+ hltFunc = highlightQuery;
235
+ } else if (state.pass == 4) {
236
+ matchFunc = matchPassContains;
237
+ hltFunc = highlightQuery;
238
+ } else if (state.pass == 5) {
206
239
  matchFunc = matchPassRegexp;
207
240
  hltFunc = highlightRegexp;
208
241
  }
data/lib/rdoc/version.rb CHANGED
@@ -5,6 +5,6 @@ module RDoc
5
5
  ##
6
6
  # RDoc version you are using
7
7
 
8
- VERSION = '6.15.0'
8
+ VERSION = '6.15.1'
9
9
 
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rdoc
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.15.0
4
+ version: 6.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Hodel
@@ -13,7 +13,7 @@ authors:
13
13
  - ITOYANAGI Sakura
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2025-10-04 00:00:00.000000000 Z
16
+ date: 2025-10-31 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: psych