rdoc 6.17.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.
- checksums.yaml +4 -4
- data/CONTRIBUTING.md +193 -0
- data/LEGAL.rdoc +6 -0
- data/LICENSE.rdoc +4 -0
- data/README.md +132 -8
- data/RI.md +75 -75
- data/doc/markup_reference/markdown.md +659 -0
- data/doc/markup_reference/rdoc.rdoc +1169 -0
- data/exe/rdoc +2 -2
- data/lib/rdoc/code_object/alias.rb +70 -74
- data/lib/rdoc/code_object/any_method.rb +308 -293
- data/lib/rdoc/code_object/attr.rb +150 -142
- data/lib/rdoc/code_object/class_module.rb +802 -715
- data/lib/rdoc/code_object/constant.rb +181 -144
- data/lib/rdoc/code_object/context/section.rb +140 -130
- data/lib/rdoc/code_object/context.rb +925 -941
- data/lib/rdoc/code_object/extend.rb +7 -5
- data/lib/rdoc/code_object/include.rb +7 -5
- data/lib/rdoc/code_object/method_attr.rb +328 -315
- data/lib/rdoc/code_object/mixin.rb +97 -92
- data/lib/rdoc/code_object/normal_class.rb +77 -78
- data/lib/rdoc/code_object/normal_module.rb +61 -59
- data/lib/rdoc/code_object/require.rb +23 -39
- data/lib/rdoc/code_object/single_class.rb +21 -19
- data/lib/rdoc/code_object/top_level.rb +215 -202
- data/lib/rdoc/code_object.rb +305 -305
- data/lib/rdoc/comment.rb +274 -337
- data/lib/rdoc/cross_reference.rb +195 -206
- data/lib/rdoc/encoding.rb +105 -103
- data/lib/rdoc/erb_partial.rb +13 -11
- data/lib/rdoc/erbio.rb +29 -27
- data/lib/rdoc/generator/aliki.rb +196 -30
- data/lib/rdoc/generator/darkfish.rb +647 -629
- data/lib/rdoc/generator/json_index.rb +233 -229
- data/lib/rdoc/generator/markup.rb +165 -122
- data/lib/rdoc/generator/pot/message_extractor.rb +57 -51
- data/lib/rdoc/generator/pot/po.rb +52 -51
- data/lib/rdoc/generator/pot/po_entry.rb +138 -132
- data/lib/rdoc/generator/pot.rb +85 -81
- data/lib/rdoc/generator/ri.rb +23 -19
- data/lib/rdoc/generator/template/aliki/DESIGN.md +538 -0
- data/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/_footer.rhtml +2 -2
- data/lib/rdoc/generator/template/aliki/_head.rhtml +15 -10
- data/lib/rdoc/generator/template/aliki/_header.rhtml +29 -44
- 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 +3 -3
- data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +3 -3
- data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/class.rhtml +71 -61
- data/lib/rdoc/generator/template/aliki/css/rdoc.css +796 -323
- data/lib/rdoc/generator/template/aliki/index.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/js/aliki.js +119 -113
- data/lib/rdoc/generator/template/aliki/js/bash_highlighter.js +167 -0
- data/lib/rdoc/generator/template/aliki/js/c_highlighter.js +1 -1
- data/lib/rdoc/generator/template/aliki/js/{search.js → search_controller.js} +16 -7
- data/lib/rdoc/generator/template/aliki/js/search_navigation.js +105 -0
- data/lib/rdoc/generator/template/aliki/js/search_ranker.js +239 -0
- data/lib/rdoc/generator/template/aliki/page.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +1 -1
- data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +2 -2
- data/lib/rdoc/generator/template/darkfish/_footer.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 +29 -32
- data/lib/rdoc/generator/template/darkfish/css/rdoc.css +19 -1
- data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +3 -3
- data/lib/rdoc/generator.rb +48 -46
- data/lib/rdoc/i18n/locale.rb +99 -95
- data/lib/rdoc/i18n/text.rb +109 -105
- data/lib/rdoc/i18n.rb +7 -5
- data/lib/rdoc/markdown/byte_runtime.rb +80 -0
- data/lib/rdoc/markdown.kpeg +52 -33
- data/lib/rdoc/markdown.rb +365 -177
- data/lib/rdoc/markup/blank_line.rb +25 -23
- data/lib/rdoc/markup/block_quote.rb +12 -8
- data/lib/rdoc/markup/document.rb +127 -123
- data/lib/rdoc/markup/element.rb +21 -0
- data/lib/rdoc/markup/formatter.rb +220 -203
- data/lib/rdoc/markup/hard_break.rb +30 -27
- data/lib/rdoc/markup/heading.rb +163 -77
- data/lib/rdoc/markup/include.rb +33 -29
- data/lib/rdoc/markup/indented_paragraph.rb +37 -33
- data/lib/rdoc/markup/inline_parser.rb +316 -0
- data/lib/rdoc/markup/list.rb +80 -88
- data/lib/rdoc/markup/list_item.rb +73 -85
- data/lib/rdoc/markup/paragraph.rb +23 -19
- data/lib/rdoc/markup/parser.rb +501 -497
- data/lib/rdoc/markup/pre_process.rb +284 -305
- data/lib/rdoc/markup/raw.rb +52 -55
- data/lib/rdoc/markup/rule.rb +16 -12
- data/lib/rdoc/markup/table.rb +48 -40
- data/lib/rdoc/markup/to_ansi.rb +143 -92
- data/lib/rdoc/markup/to_bs.rb +86 -102
- data/lib/rdoc/markup/to_html.rb +608 -506
- data/lib/rdoc/markup/to_html_crossref.rb +219 -210
- data/lib/rdoc/markup/to_html_snippet.rb +210 -205
- data/lib/rdoc/markup/to_joined_paragraph.rb +40 -41
- data/lib/rdoc/markup/to_label.rb +64 -51
- data/lib/rdoc/markup/to_markdown.rb +212 -184
- data/lib/rdoc/markup/to_rdoc.rb +341 -277
- data/lib/rdoc/markup/to_table_of_contents.rb +66 -62
- data/lib/rdoc/markup/to_test.rb +62 -50
- data/lib/rdoc/markup/to_tt_only.rb +83 -92
- data/lib/rdoc/markup/verbatim.rb +62 -58
- data/lib/rdoc/markup.rb +196 -215
- data/lib/rdoc/options.rb +1063 -1076
- data/lib/rdoc/parser/c.rb +1039 -1036
- data/lib/rdoc/parser/changelog.rb +320 -287
- data/lib/rdoc/parser/markdown.rb +17 -13
- data/lib/rdoc/parser/rbs.rb +279 -0
- data/lib/rdoc/parser/rd.rb +17 -13
- data/lib/rdoc/parser/ruby.rb +1231 -2222
- data/lib/rdoc/parser/ruby_colorizer.rb +303 -0
- data/lib/rdoc/parser/simple.rb +31 -27
- data/lib/rdoc/parser/text.rb +12 -8
- data/lib/rdoc/parser.rb +230 -221
- data/lib/rdoc/rbs_helper.rb +186 -0
- data/lib/rdoc/rd/inline.rb +57 -53
- data/lib/rdoc/rd.rb +90 -88
- data/lib/rdoc/rdoc.rb +547 -366
- data/lib/rdoc/ri/driver.rb +1141 -1130
- data/lib/rdoc/ri/formatter.rb +7 -3
- data/lib/rdoc/ri/paths.rb +140 -136
- data/lib/rdoc/ri/servlet.rb +456 -0
- data/lib/rdoc/ri/store.rb +4 -2
- data/lib/rdoc/ri/task.rb +55 -51
- data/lib/rdoc/ri.rb +14 -11
- data/lib/rdoc/rubygems_hook.rb +194 -192
- data/lib/rdoc/server.rb +462 -0
- data/lib/rdoc/stats/normal.rb +46 -42
- data/lib/rdoc/stats/quiet.rb +39 -35
- data/lib/rdoc/stats/verbose.rb +35 -31
- data/lib/rdoc/stats.rb +363 -338
- data/lib/rdoc/store.rb +919 -725
- data/lib/rdoc/task.rb +260 -255
- data/lib/rdoc/text.rb +164 -240
- data/lib/rdoc/token_stream.rb +88 -106
- data/lib/rdoc/tom_doc.rb +203 -201
- data/lib/rdoc/version.rb +1 -1
- data/lib/rdoc.rb +35 -7
- data/lib/rubygems_plugin.rb +2 -11
- data/rdoc-logo.svg +43 -0
- data/rdoc.gemspec +9 -7
- metadata +46 -32
- data/CONTRIBUTING.rdoc +0 -219
- data/ExampleMarkdown.md +0 -39
- data/ExampleRDoc.rdoc +0 -210
- data/lib/rdoc/code_object/anon_class.rb +0 -10
- data/lib/rdoc/code_object/ghost_method.rb +0 -6
- data/lib/rdoc/code_object/meta_method.rb +0 -6
- data/lib/rdoc/markdown/literals.kpeg +0 -21
- data/lib/rdoc/markdown/literals.rb +0 -454
- data/lib/rdoc/markup/attr_changer.rb +0 -22
- data/lib/rdoc/markup/attr_span.rb +0 -35
- data/lib/rdoc/markup/attribute_manager.rb +0 -405
- data/lib/rdoc/markup/attributes.rb +0 -70
- data/lib/rdoc/markup/regexp_handling.rb +0 -40
- data/lib/rdoc/parser/prism_ruby.rb +0 -1100
- data/lib/rdoc/parser/ripper_state_lex.rb +0 -302
- data/lib/rdoc/parser/ruby_tools.rb +0 -163
- data/lib/rdoc/servlet.rb +0 -452
|
@@ -3,54 +3,39 @@
|
|
|
3
3
|
<%= h @options.title %>
|
|
4
4
|
</a>
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
<
|
|
10
|
-
|
|
11
|
-
type="text" name="search" placeholder="Search (/) for a class, method..."
|
|
12
|
-
spellcheck="false" autocomplete="off"
|
|
13
|
-
title="Type to search, Up and Down to navigate, Enter to load">
|
|
14
|
-
<ul id="search-results" aria-label="Search Results"
|
|
15
|
-
aria-busy="false" aria-expanded="false"
|
|
16
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
|
17
|
-
</form>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<!-- Mobile search icon button -->
|
|
21
|
-
<button id="search-toggle" class="navbar-search-mobile" aria-label="Open search" type="button">
|
|
22
|
-
<span aria-hidden="true">🔍</span>
|
|
23
|
-
</button>
|
|
24
|
-
|
|
25
|
-
<!-- Theme toggle button -->
|
|
26
|
-
<button id="theme-toggle" class="theme-toggle" aria-label="Switch to dark mode" type="button">
|
|
27
|
-
<span class="theme-toggle-icon" aria-hidden="true">🌙</span>
|
|
28
|
-
</button>
|
|
29
|
-
</header>
|
|
6
|
+
<div class="navbar-search" data-search-container>
|
|
7
|
+
<button id="search-toggle" class="navbar-search-mobile" aria-label="Open search"
|
|
8
|
+
aria-controls="search-surface" aria-expanded="false" type="button">
|
|
9
|
+
<span aria-hidden="true">🔍</span>
|
|
10
|
+
</button>
|
|
30
11
|
|
|
31
|
-
|
|
32
|
-
<div id="search-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
spellcheck="false" autocomplete="off">
|
|
42
|
-
<button type="button" class="search-modal-close" aria-label="Close search" id="search-modal-close">
|
|
12
|
+
<div class="search-backdrop" data-search-close></div>
|
|
13
|
+
<div id="search-surface" class="search-surface">
|
|
14
|
+
<form class="search-form" role="search" action="#" method="get" accept-charset="utf-8">
|
|
15
|
+
<span class="search-icon" aria-hidden="true">🔍</span>
|
|
16
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
|
17
|
+
aria-autocomplete="list" aria-controls="search-results"
|
|
18
|
+
type="text" name="search" placeholder="Search (/) for a class, method..."
|
|
19
|
+
spellcheck="false" autocomplete="off"
|
|
20
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
21
|
+
<button type="button" class="search-close" aria-label="Close search" data-search-close>
|
|
43
22
|
<span aria-hidden="true">esc</span>
|
|
44
23
|
</button>
|
|
45
24
|
</form>
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
25
|
+
|
|
26
|
+
<div class="search-body">
|
|
27
|
+
<ul id="search-results" aria-label="Search Results"
|
|
28
|
+
aria-busy="false" aria-expanded="false"
|
|
29
|
+
aria-atomic="false" class="initially-hidden search-results"></ul>
|
|
30
|
+
<div class="search-empty">
|
|
31
|
+
<p>No recent searches</p>
|
|
32
|
+
</div>
|
|
53
33
|
</div>
|
|
54
34
|
</div>
|
|
55
35
|
</div>
|
|
56
|
-
|
|
36
|
+
|
|
37
|
+
<!-- Theme toggle button -->
|
|
38
|
+
<button id="theme-toggle" class="theme-toggle" aria-label="Switch to dark mode" type="button">
|
|
39
|
+
<span class="theme-toggle-icon" aria-hidden="true">🌙</span>
|
|
40
|
+
</button>
|
|
41
|
+
</header>
|
|
@@ -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>
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
<%- simple_files = @files.select { |f| f.text? } %>
|
|
1
|
+
<%- simple_files = @files.select { |f| f.text? && f.full_name != @options.main_page } %>
|
|
2
2
|
|
|
3
3
|
<%- if defined?(current) && current.respond_to?(:page_name) %>
|
|
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>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<div id="search-section"
|
|
2
|
-
<form action="#" method="get" accept-charset="utf-8">
|
|
1
|
+
<div id="search-section" class="project-section initially-hidden" data-search-container>
|
|
2
|
+
<form role="search" action="#" method="get" accept-charset="utf-8">
|
|
3
3
|
<div id="search-field-wrapper">
|
|
4
4
|
<input id="search-field" role="combobox" aria-label="Search"
|
|
5
5
|
aria-autocomplete="list" aria-controls="search-results"
|
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
|
|
11
11
|
<ul id="search-results" aria-label="Search Results"
|
|
12
12
|
aria-busy="false" aria-expanded="false"
|
|
13
|
-
aria-atomic="false" class="initially-hidden"></ul>
|
|
13
|
+
aria-atomic="false" class="initially-hidden search-results"></ul>
|
|
14
14
|
</form>
|
|
15
15
|
</div>
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<div id="navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="
|
|
1
|
+
<div id="sidebar-navigation-toggle" role="button" tabindex="0" aria-label="Toggle sidebar" aria-expanded="false" aria-controls="sidebar-navigation">
|
|
2
2
|
<span aria-hidden="true">☰</span>
|
|
3
3
|
</div>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<%= render '_header.rhtml' %>
|
|
4
4
|
<%= render '_sidebar_toggle.rhtml' %>
|
|
5
5
|
|
|
6
|
-
<nav id="navigation" role="navigation">
|
|
6
|
+
<nav id="sidebar-navigation" role="navigation" hidden>
|
|
7
7
|
<%= render '_sidebar_pages.rhtml' %>
|
|
8
8
|
<%= render '_sidebar_sections.rhtml' %>
|
|
9
9
|
<%= render '_sidebar_ancestors.rhtml' %>
|
|
@@ -22,15 +22,17 @@
|
|
|
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 %>
|
|
29
29
|
</ol>
|
|
30
30
|
<% end %>
|
|
31
31
|
|
|
32
|
-
<
|
|
33
|
-
|
|
32
|
+
<span id="<%= h klass.legacy_aref %>" class="legacy-anchor"></span>
|
|
33
|
+
<h1 id="<%= h klass.aref %>" class="anchor-link <%= klass.type %> page-title">
|
|
34
|
+
<span class="page-title-kind"><%= klass.type %></span>
|
|
35
|
+
<span class="page-title-name"><%= klass.full_name %></span>
|
|
34
36
|
</h1>
|
|
35
37
|
|
|
36
38
|
<section class="description">
|
|
@@ -38,32 +40,33 @@
|
|
|
38
40
|
</section>
|
|
39
41
|
|
|
40
42
|
<%- klass.each_section do |section, constants, attributes| %>
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
+
<span id="<%= section.legacy_aref %>" class="legacy-anchor"></span>
|
|
44
|
+
<section class="documentation-section anchor-link">
|
|
45
|
+
<%- if section.title %>
|
|
43
46
|
<header class="documentation-section-title">
|
|
44
|
-
<h2>
|
|
47
|
+
<h2 id="<%= section.aref %>">
|
|
45
48
|
<a href="#<%= section.aref %>"><%= section.title %></a>
|
|
46
49
|
</h2>
|
|
47
50
|
</header>
|
|
48
51
|
<%- end %>
|
|
49
52
|
|
|
50
|
-
<%- if section.comment
|
|
53
|
+
<%- if section.comment %>
|
|
51
54
|
<div>
|
|
52
55
|
<%= section.description %>
|
|
53
56
|
</div>
|
|
54
57
|
<%- end %>
|
|
55
58
|
|
|
56
|
-
<%- unless constants.empty?
|
|
59
|
+
<%- unless constants.empty? %>
|
|
57
60
|
<section class="constants-list">
|
|
58
61
|
<header>
|
|
59
|
-
<h3 id="constants"><a href="
|
|
62
|
+
<h3 id="<%= section.aref %>-constants"><a href="#<%= section.aref %>-constants">Constants</a></h3>
|
|
60
63
|
</header>
|
|
61
64
|
<dl>
|
|
62
65
|
<%- constants.each do |const| %>
|
|
63
66
|
<dt id="<%= const.name %>"><%= const.name %></dt>
|
|
64
|
-
<%- if const.comment
|
|
67
|
+
<%- if const.comment %>
|
|
65
68
|
<dd>
|
|
66
|
-
<%- if const.mixin_from
|
|
69
|
+
<%- if const.mixin_from %>
|
|
67
70
|
<div class="mixin-from">
|
|
68
71
|
Included from <a href="<%= klass.aref_to(const.mixin_from.path) %>"><%= const.mixin_from.full_name %></a>
|
|
69
72
|
</div>
|
|
@@ -78,10 +81,10 @@
|
|
|
78
81
|
</section>
|
|
79
82
|
<%- end %>
|
|
80
83
|
|
|
81
|
-
<%- unless attributes.empty?
|
|
84
|
+
<%- unless attributes.empty? %>
|
|
82
85
|
<section class="attribute-method-details method-section">
|
|
83
86
|
<header>
|
|
84
|
-
<h3 id="attributes"><a href="
|
|
87
|
+
<h3 id="<%= section.aref %>-attributes"><a href="#<%= section.aref %>-attributes">Attributes</a></h3>
|
|
85
88
|
</header>
|
|
86
89
|
|
|
87
90
|
<%- attributes.each do |attrib| %>
|
|
@@ -91,15 +94,18 @@
|
|
|
91
94
|
<span class="method-name"><%= h attrib.name %></span>
|
|
92
95
|
<span class="attribute-access-type">[<%= attrib.rw %>]</span>
|
|
93
96
|
</a>
|
|
97
|
+
<%- if (sig_html = type_signature_html(attrib, klass.path)) %>
|
|
98
|
+
<span class="method-type-signature"><code><%= sig_html %></code></span>
|
|
99
|
+
<%- end %>
|
|
94
100
|
</div>
|
|
95
101
|
|
|
96
102
|
<div class="method-description">
|
|
97
|
-
<%- if attrib.mixin_from
|
|
103
|
+
<%- if attrib.mixin_from %>
|
|
98
104
|
<div class="mixin-from">
|
|
99
105
|
<%= attrib.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(attrib.mixin_from.path) %>"><%= attrib.mixin_from.full_name %></a>
|
|
100
106
|
</div>
|
|
101
107
|
<%- end %>
|
|
102
|
-
<%- if attrib.comment
|
|
108
|
+
<%- if attrib.comment %>
|
|
103
109
|
<%= attrib.description.strip %>
|
|
104
110
|
<%- else %>
|
|
105
111
|
<p class="missing-docs">(Not documented)</p>
|
|
@@ -110,84 +116,88 @@
|
|
|
110
116
|
</section>
|
|
111
117
|
<%- end %>
|
|
112
118
|
|
|
113
|
-
<%- klass.methods_by_type(section).each do |type, visibilities|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
<%- klass.methods_by_type(section).each do |type, visibilities| %>
|
|
120
|
+
<%- next if visibilities.empty? %>
|
|
121
|
+
<%- visibilities.each do |visibility, methods| %>
|
|
122
|
+
<%- next if methods.empty? %>
|
|
117
123
|
<section id="<%= visibility %>-<%= type %>-<%= section.aref %>-method-details" class="method-section anchor-link">
|
|
118
124
|
<header>
|
|
119
|
-
<h3 id="<%= visibility %>-<%= type %>-methods"><a href="#<%= visibility %>-<%= type %>-methods"><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</a></h3>
|
|
125
|
+
<h3 id="<%= visibility %>-<%= type %>-<%= section.aref %>-methods"><a href="#<%= visibility %>-<%= type %>-<%= section.aref %>-methods"><%= visibility.to_s.capitalize %> <%= type.capitalize %> Methods</a></h3>
|
|
120
126
|
</header>
|
|
121
127
|
|
|
122
128
|
<%- methods.each do |method| %>
|
|
123
129
|
<div id="<%= method.aref %>" class="method-detail anchor-link <%= method.is_alias_for ? "method-alias" : '' %>">
|
|
124
130
|
<div class="method-header">
|
|
125
|
-
|
|
126
|
-
<%- call_seq
|
|
131
|
+
<div class="method-heading-group">
|
|
132
|
+
<%- if (call_seq = method.call_seq) %>
|
|
133
|
+
<%- call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
|
|
134
|
+
<div class="method-heading">
|
|
135
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
|
136
|
+
<span class="method-callseq">
|
|
137
|
+
<%= h(call_seq.strip.
|
|
138
|
+
gsub( /^\w+\./m, '')).
|
|
139
|
+
gsub(/(.*)[-=]>/, '\1→') %>
|
|
140
|
+
</span>
|
|
141
|
+
</a>
|
|
142
|
+
</div>
|
|
143
|
+
<%- end %>
|
|
144
|
+
<%- elsif method.has_call_seq? %>
|
|
145
|
+
<div class="method-heading">
|
|
146
|
+
<a href="#<%= method.aref %>" title="Link to this method">
|
|
147
|
+
<span class="method-name"><%= h method.name %></span>
|
|
148
|
+
</a>
|
|
149
|
+
</div>
|
|
150
|
+
<%- else %>
|
|
127
151
|
<div class="method-heading">
|
|
128
152
|
<a href="#<%= method.aref %>" title="Link to this method">
|
|
129
|
-
<span class="method-
|
|
130
|
-
|
|
131
|
-
gsub( /^\w+\./m, '')).
|
|
132
|
-
gsub(/(.*)[-=]>/, '\1→') %>
|
|
133
|
-
</span>
|
|
153
|
+
<span class="method-name"><%= h method.name %></span>
|
|
154
|
+
<span class="method-args"><%= h method.param_seq %></span>
|
|
134
155
|
</a>
|
|
135
156
|
</div>
|
|
136
157
|
<%- end %>
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
<%-
|
|
144
|
-
<div class="method-
|
|
145
|
-
<
|
|
146
|
-
<span class="method-
|
|
147
|
-
|
|
148
|
-
</a>
|
|
158
|
+
|
|
159
|
+
<%- if (sig_html = type_signature_html(method, klass.path)) %>
|
|
160
|
+
<pre class="method-type-signature"><code><%= sig_html %></code></pre>
|
|
161
|
+
<%- end %>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<%- if method.token_stream %>
|
|
165
|
+
<div class="method-controls">
|
|
166
|
+
<details class="method-source-toggle">
|
|
167
|
+
<summary><span class="method-source-icon" aria-hidden="true">{}</span> Source</summary>
|
|
168
|
+
</details>
|
|
149
169
|
</div>
|
|
150
170
|
<%- end %>
|
|
151
171
|
</div>
|
|
152
172
|
|
|
153
173
|
<%- if method.token_stream %>
|
|
154
|
-
<div class="method-
|
|
155
|
-
<
|
|
156
|
-
<summary>Source</summary>
|
|
157
|
-
</details>
|
|
174
|
+
<div class="method-source-code" id="<%= method.html_name %>-source">
|
|
175
|
+
<pre class="<%= method.source_language %>"><%= method.markup_code %></pre>
|
|
158
176
|
</div>
|
|
159
177
|
<%- end %>
|
|
160
178
|
|
|
161
|
-
<%- unless method.skip_description?
|
|
179
|
+
<%- unless method.skip_description? %>
|
|
162
180
|
<div class="method-description">
|
|
163
|
-
<%- if method.
|
|
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 %>
|
|
181
|
+
<%- if method.mixin_from %>
|
|
169
182
|
<div class="mixin-from">
|
|
170
183
|
<%= method.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(method.mixin_from.path) %>"><%= method.mixin_from.full_name %></a>
|
|
171
184
|
</div>
|
|
172
185
|
<%- end %>
|
|
173
|
-
<%- if method.comment
|
|
186
|
+
<%- if method.comment %>
|
|
174
187
|
<%= method.description.strip %>
|
|
175
188
|
<%- else %>
|
|
176
189
|
<p class="missing-docs">(Not documented)</p>
|
|
177
190
|
<%- end %>
|
|
178
|
-
<%- if method.calls_super
|
|
191
|
+
<%- if method.calls_super %>
|
|
179
192
|
<div class="method-calls-super">
|
|
180
193
|
Calls superclass method
|
|
181
|
-
<%=
|
|
182
|
-
method.superclass_method ?
|
|
183
|
-
method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil
|
|
184
|
-
%>
|
|
194
|
+
<%= method.superclass_method_link %>
|
|
185
195
|
</div>
|
|
186
196
|
<%- end %>
|
|
187
197
|
</div>
|
|
188
198
|
<%- end %>
|
|
189
199
|
|
|
190
|
-
<%- unless method.aliases.empty?
|
|
200
|
+
<%- unless method.aliases.empty? %>
|
|
191
201
|
<div class="aliases">
|
|
192
202
|
Also aliased as: <%= method.aliases.map do |aka|
|
|
193
203
|
if aka.parent then # HACK lib/rexml/encodings
|
|
@@ -199,7 +209,7 @@
|
|
|
199
209
|
</div>
|
|
200
210
|
<%- end %>
|
|
201
211
|
|
|
202
|
-
<%- if method.is_alias_for
|
|
212
|
+
<%- if method.is_alias_for %>
|
|
203
213
|
<div class="aliases">
|
|
204
214
|
Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
|
|
205
215
|
</div>
|
|
@@ -208,8 +218,8 @@
|
|
|
208
218
|
|
|
209
219
|
<%- end %>
|
|
210
220
|
</section>
|
|
211
|
-
<%- end
|
|
212
|
-
|
|
221
|
+
<%- end %>
|
|
222
|
+
<%- end %>
|
|
213
223
|
</section>
|
|
214
224
|
<%- end %>
|
|
215
225
|
</main>
|