rdoc 7.2.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.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +4 -7
  3. data/LICENSE.rdoc +4 -0
  4. data/README.md +43 -2
  5. data/RI.md +75 -75
  6. data/doc/markup_reference/markdown.md +104 -3
  7. data/exe/rdoc +2 -2
  8. data/lib/rdoc/code_object/alias.rb +70 -74
  9. data/lib/rdoc/code_object/any_method.rb +305 -298
  10. data/lib/rdoc/code_object/attr.rb +150 -143
  11. data/lib/rdoc/code_object/class_module.rb +801 -765
  12. data/lib/rdoc/code_object/constant.rb +178 -150
  13. data/lib/rdoc/code_object/context/section.rb +133 -160
  14. data/lib/rdoc/code_object/context.rb +925 -952
  15. data/lib/rdoc/code_object/extend.rb +7 -5
  16. data/lib/rdoc/code_object/include.rb +7 -5
  17. data/lib/rdoc/code_object/method_attr.rb +325 -324
  18. data/lib/rdoc/code_object/mixin.rb +97 -95
  19. data/lib/rdoc/code_object/normal_class.rb +77 -78
  20. data/lib/rdoc/code_object/normal_module.rb +61 -59
  21. data/lib/rdoc/code_object/require.rb +23 -39
  22. data/lib/rdoc/code_object/single_class.rb +21 -19
  23. data/lib/rdoc/code_object/top_level.rb +212 -213
  24. data/lib/rdoc/code_object.rb +305 -305
  25. data/lib/rdoc/comment.rb +274 -337
  26. data/lib/rdoc/cross_reference.rb +194 -212
  27. data/lib/rdoc/encoding.rb +105 -103
  28. data/lib/rdoc/erb_partial.rb +13 -11
  29. data/lib/rdoc/erbio.rb +29 -27
  30. data/lib/rdoc/generator/aliki.rb +165 -140
  31. data/lib/rdoc/generator/darkfish.rb +647 -631
  32. data/lib/rdoc/generator/json_index.rb +233 -229
  33. data/lib/rdoc/generator/markup.rb +165 -122
  34. data/lib/rdoc/generator/pot/message_extractor.rb +57 -51
  35. data/lib/rdoc/generator/pot/po.rb +52 -51
  36. data/lib/rdoc/generator/pot/po_entry.rb +138 -132
  37. data/lib/rdoc/generator/pot.rb +85 -81
  38. data/lib/rdoc/generator/ri.rb +23 -19
  39. data/lib/rdoc/generator/template/aliki/DESIGN.md +538 -0
  40. data/lib/rdoc/generator/template/aliki/_aside_toc.rhtml +1 -1
  41. data/lib/rdoc/generator/template/aliki/_footer.rhtml +1 -1
  42. data/lib/rdoc/generator/template/aliki/_head.rhtml +11 -11
  43. data/lib/rdoc/generator/template/aliki/_header.rhtml +29 -44
  44. data/lib/rdoc/generator/template/aliki/_sidebar_extends.rhtml +8 -6
  45. data/lib/rdoc/generator/template/aliki/_sidebar_includes.rhtml +8 -6
  46. data/lib/rdoc/generator/template/aliki/_sidebar_installed.rhtml +1 -1
  47. data/lib/rdoc/generator/template/aliki/_sidebar_pages.rhtml +2 -2
  48. data/lib/rdoc/generator/template/aliki/_sidebar_search.rhtml +4 -4
  49. data/lib/rdoc/generator/template/aliki/_sidebar_sections.rhtml +1 -1
  50. data/lib/rdoc/generator/template/aliki/_sidebar_toggle.rhtml +1 -1
  51. data/lib/rdoc/generator/template/aliki/class.rhtml +56 -46
  52. data/lib/rdoc/generator/template/aliki/css/rdoc.css +538 -283
  53. data/lib/rdoc/generator/template/aliki/index.rhtml +1 -1
  54. data/lib/rdoc/generator/template/aliki/js/aliki.js +80 -102
  55. data/lib/rdoc/generator/template/aliki/page.rhtml +1 -1
  56. data/lib/rdoc/generator/template/aliki/servlet_not_found.rhtml +1 -1
  57. data/lib/rdoc/generator/template/aliki/servlet_root.rhtml +2 -2
  58. data/lib/rdoc/generator/template/darkfish/_footer.rhtml +1 -1
  59. data/lib/rdoc/generator/template/darkfish/_sidebar_extends.rhtml +8 -6
  60. data/lib/rdoc/generator/template/darkfish/_sidebar_includes.rhtml +8 -6
  61. data/lib/rdoc/generator/template/darkfish/_sidebar_installed.rhtml +1 -1
  62. data/lib/rdoc/generator/template/darkfish/_sidebar_pages.rhtml +1 -1
  63. data/lib/rdoc/generator/template/darkfish/_sidebar_sections.rhtml +1 -1
  64. data/lib/rdoc/generator/template/darkfish/_sidebar_table_of_contents.rhtml +5 -5
  65. data/lib/rdoc/generator/template/darkfish/class.rhtml +18 -21
  66. data/lib/rdoc/generator/template/darkfish/css/rdoc.css +0 -1
  67. data/lib/rdoc/generator/template/darkfish/table_of_contents.rhtml +3 -3
  68. data/lib/rdoc/generator.rb +48 -46
  69. data/lib/rdoc/i18n/locale.rb +99 -95
  70. data/lib/rdoc/i18n/text.rb +109 -105
  71. data/lib/rdoc/i18n.rb +7 -5
  72. data/lib/rdoc/markdown/byte_runtime.rb +80 -0
  73. data/lib/rdoc/markdown.kpeg +30 -21
  74. data/lib/rdoc/markdown.rb +329 -151
  75. data/lib/rdoc/markup/block_quote.rb +12 -8
  76. data/lib/rdoc/markup/document.rb +127 -123
  77. data/lib/rdoc/markup/formatter.rb +215 -221
  78. data/lib/rdoc/markup/heading.rb +1 -4
  79. data/lib/rdoc/markup/include.rb +33 -29
  80. data/lib/rdoc/markup/indented_paragraph.rb +37 -33
  81. data/lib/rdoc/markup/inline_parser.rb +281 -277
  82. data/lib/rdoc/markup/list.rb +80 -88
  83. data/lib/rdoc/markup/list_item.rb +73 -85
  84. data/lib/rdoc/markup/paragraph.rb +23 -19
  85. data/lib/rdoc/markup/parser.rb +501 -497
  86. data/lib/rdoc/markup/pre_process.rb +284 -305
  87. data/lib/rdoc/markup/raw.rb +2 -2
  88. data/lib/rdoc/markup/rule.rb +16 -12
  89. data/lib/rdoc/markup/to_ansi.rb +143 -139
  90. data/lib/rdoc/markup/to_bs.rb +72 -68
  91. data/lib/rdoc/markup/to_html.rb +600 -493
  92. data/lib/rdoc/markup/to_html_crossref.rb +221 -191
  93. data/lib/rdoc/markup/to_html_snippet.rb +232 -227
  94. data/lib/rdoc/markup/to_joined_paragraph.rb +40 -41
  95. data/lib/rdoc/markup/to_label.rb +63 -59
  96. data/lib/rdoc/markup/to_markdown.rb +212 -208
  97. data/lib/rdoc/markup/to_rdoc.rb +336 -332
  98. data/lib/rdoc/markup/to_table_of_contents.rb +66 -62
  99. data/lib/rdoc/markup/to_test.rb +60 -56
  100. data/lib/rdoc/markup/to_tt_only.rb +83 -86
  101. data/lib/rdoc/markup/verbatim.rb +62 -58
  102. data/lib/rdoc/markup.rb +198 -196
  103. data/lib/rdoc/options.rb +1063 -1076
  104. data/lib/rdoc/parser/c.rb +1039 -1036
  105. data/lib/rdoc/parser/changelog.rb +319 -315
  106. data/lib/rdoc/parser/markdown.rb +17 -13
  107. data/lib/rdoc/parser/rbs.rb +279 -0
  108. data/lib/rdoc/parser/rd.rb +17 -13
  109. data/lib/rdoc/parser/ruby.rb +1231 -2222
  110. data/lib/rdoc/parser/ruby_colorizer.rb +303 -0
  111. data/lib/rdoc/parser/simple.rb +31 -27
  112. data/lib/rdoc/parser/text.rb +12 -8
  113. data/lib/rdoc/parser.rb +230 -221
  114. data/lib/rdoc/rbs_helper.rb +186 -0
  115. data/lib/rdoc/rd/inline.rb +57 -53
  116. data/lib/rdoc/rd.rb +90 -88
  117. data/lib/rdoc/rdoc.rb +547 -366
  118. data/lib/rdoc/ri/driver.rb +1141 -1130
  119. data/lib/rdoc/ri/formatter.rb +7 -3
  120. data/lib/rdoc/ri/paths.rb +140 -136
  121. data/lib/rdoc/ri/servlet.rb +456 -0
  122. data/lib/rdoc/ri/store.rb +4 -2
  123. data/lib/rdoc/ri/task.rb +55 -51
  124. data/lib/rdoc/ri.rb +14 -11
  125. data/lib/rdoc/rubygems_hook.rb +194 -192
  126. data/lib/rdoc/server.rb +462 -0
  127. data/lib/rdoc/stats/normal.rb +46 -42
  128. data/lib/rdoc/stats/quiet.rb +39 -35
  129. data/lib/rdoc/stats/verbose.rb +35 -31
  130. data/lib/rdoc/stats.rb +363 -338
  131. data/lib/rdoc/store.rb +919 -725
  132. data/lib/rdoc/task.rb +260 -255
  133. data/lib/rdoc/text.rb +130 -245
  134. data/lib/rdoc/token_stream.rb +101 -115
  135. data/lib/rdoc/tom_doc.rb +203 -201
  136. data/lib/rdoc/version.rb +1 -1
  137. data/lib/rdoc.rb +35 -7
  138. data/lib/rubygems_plugin.rb +2 -11
  139. data/rdoc-logo.svg +43 -0
  140. data/rdoc.gemspec +6 -4
  141. metadata +36 -20
  142. data/lib/rdoc/code_object/anon_class.rb +0 -10
  143. data/lib/rdoc/code_object/ghost_method.rb +0 -6
  144. data/lib/rdoc/code_object/meta_method.rb +0 -6
  145. data/lib/rdoc/markdown/literals.kpeg +0 -21
  146. data/lib/rdoc/markdown/literals.rb +0 -454
  147. data/lib/rdoc/parser/prism_ruby.rb +0 -1112
  148. data/lib/rdoc/parser/ripper_state_lex.rb +0 -302
  149. data/lib/rdoc/parser/ruby_tools.rb +0 -163
  150. data/lib/rdoc/servlet.rb +0 -452
@@ -3,7 +3,7 @@
3
3
  <%= render '_header.rhtml' %>
4
4
  <%= render '_sidebar_toggle.rhtml' %>
5
5
 
6
- <nav id="navigation" role="navigation" hidden>
6
+ <nav id="sidebar-navigation" role="navigation" hidden>
7
7
  <%= render '_sidebar_pages.rhtml' %>
8
8
  <%= render '_sidebar_classes.rhtml' %>
9
9
  </nav>
@@ -47,6 +47,8 @@ function createSearchInstance(input, result) {
47
47
  html += `<span class="search-type search-type-${this.escapeHTML(typeClass)}">${typeLabel}</span>`;
48
48
  }
49
49
 
50
+ html += '</p>';
51
+
50
52
  if (result.snippet)
51
53
  html += `<div class="search-snippet">${result.snippet}</div>`;
52
54
 
@@ -75,10 +77,15 @@ function createSearchInstance(input, result) {
75
77
 
76
78
  function hookSearch() {
77
79
  const input = document.querySelector('#search-field');
78
- const result = document.querySelector('#search-results-desktop');
80
+ const result = document.querySelector('#search-results');
79
81
 
80
82
  if (!input || !result) return; // Exit if search elements not found
81
83
 
84
+ const container = input.closest('[data-search-container]');
85
+ const searchToggle = document.querySelector('#search-toggle');
86
+ const searchEmpty = container && container.querySelector('.search-empty');
87
+ let focusBeforeOpen = null;
88
+
82
89
  const search_section = document.querySelector('#search-section');
83
90
  if (search_section) {
84
91
  search_section.classList.remove("initially-hidden");
@@ -87,23 +94,65 @@ function hookSearch() {
87
94
  const search = createSearchInstance(input, result);
88
95
  if (!search) return;
89
96
 
97
+ if (searchEmpty) {
98
+ const originalRenderItem = search.renderItem;
99
+ search.renderItem = function(result) {
100
+ searchEmpty.style.display = 'none';
101
+ return originalRenderItem.call(this, result);
102
+ };
103
+ }
104
+
105
+ const showSearchSurface = () => {
106
+ if (container) container.classList.add('is-open');
107
+ if (searchToggle) searchToggle.setAttribute('aria-expanded', 'true');
108
+ };
109
+
110
+ const openSearch = () => {
111
+ focusBeforeOpen = document.activeElement;
112
+ showSearchSurface();
113
+ input.focus({ preventScroll: true });
114
+ };
115
+
116
+ const closeSearch = (restoreFocus = true) => {
117
+ if (container) container.classList.remove('is-open');
118
+ if (searchToggle) searchToggle.setAttribute('aria-expanded', 'false');
119
+ search.hide();
120
+ input.blur();
121
+
122
+ if (restoreFocus && focusBeforeOpen && typeof focusBeforeOpen.focus === 'function') {
123
+ focusBeforeOpen.focus({ preventScroll: true });
124
+ }
125
+ focusBeforeOpen = null;
126
+ };
127
+
128
+ if (searchToggle) searchToggle.addEventListener('click', openSearch);
129
+ if (container) {
130
+ container.querySelectorAll('[data-search-close]').forEach((control) => {
131
+ control.addEventListener('click', () => closeSearch());
132
+ });
133
+ }
134
+
135
+ hookFocus(openSearch);
136
+
90
137
  // Hide search results when clicking outside the search area
91
138
  document.addEventListener('click', (e) => {
92
- if (!e.target.closest('.navbar-search-desktop')) {
93
- search.hide();
94
- }
139
+ if (container && container.contains(e.target)) return;
140
+
141
+ search.hide();
142
+ if (container && container.classList.contains('is-open')) closeSearch(false);
95
143
  });
96
144
 
97
- // Hide search results on Escape key on desktop too
145
+ // Close the search surface on Escape
98
146
  document.addEventListener('keydown', (e) => {
99
- if (e.key === 'Escape' && input.matches(":focus")) {
100
- search.hide();
101
- input.blur();
147
+ const isOpen = container && container.classList.contains('is-open');
148
+ if (e.key === 'Escape' && (isOpen || input.matches(":focus"))) {
149
+ closeSearch();
102
150
  }
103
151
  });
104
152
 
105
153
  // Show search results when focusing on input (if there's a query)
106
154
  input.addEventListener('focus', () => {
155
+ showSearchSurface();
107
156
  if (input.value.trim()) {
108
157
  search.show();
109
158
  }
@@ -114,6 +163,7 @@ function hookSearch() {
114
163
  const urlParams = new URLSearchParams(window.location.search);
115
164
  const queryParam = urlParams.get('q');
116
165
  if (queryParam) {
166
+ openSearch();
117
167
  input.value = queryParam;
118
168
  search.search(queryParam, false);
119
169
  }
@@ -122,14 +172,14 @@ function hookSearch() {
122
172
 
123
173
  /* ===== Keyboard Shortcuts ===== */
124
174
 
125
- function hookFocus() {
175
+ function hookFocus(openSearch) {
126
176
  document.addEventListener("keydown", (event) => {
127
177
  if (document.activeElement.tagName === 'INPUT') {
128
178
  return;
129
179
  }
130
180
  if (event.key === "/") {
131
181
  event.preventDefault();
132
- document.querySelector('#search-field').focus();
182
+ openSearch();
133
183
  }
134
184
  });
135
185
  }
@@ -137,32 +187,32 @@ function hookFocus() {
137
187
  /* ===== Mobile Navigation ===== */
138
188
 
139
189
  function hookSidebar() {
140
- const navigation = document.querySelector('#navigation');
141
- const navigationToggle = document.querySelector('#navigation-toggle');
190
+ const sidebarNavigation = document.querySelector('#sidebar-navigation');
191
+ const sidebarNavigationToggle = document.querySelector('#sidebar-navigation-toggle');
142
192
 
143
- if (!navigation || !navigationToggle) return;
193
+ if (!sidebarNavigation || !sidebarNavigationToggle) return;
144
194
 
145
195
  const closeNav = () => {
146
- navigation.hidden = true;
147
- navigationToggle.ariaExpanded = 'false';
148
- document.body.classList.remove('nav-open');
196
+ sidebarNavigation.hidden = true;
197
+ sidebarNavigationToggle.ariaExpanded = 'false';
198
+ document.body.classList.remove('sidebar-navigation-open');
149
199
  };
150
200
 
151
201
  const openNav = () => {
152
- navigation.hidden = false;
153
- navigationToggle.ariaExpanded = 'true';
154
- document.body.classList.add('nav-open');
202
+ sidebarNavigation.hidden = false;
203
+ sidebarNavigationToggle.ariaExpanded = 'true';
204
+ document.body.classList.add('sidebar-navigation-open');
155
205
  };
156
206
 
157
207
  const toggleNav = () => {
158
- if (navigation.hidden) {
208
+ if (sidebarNavigation.hidden) {
159
209
  openNav();
160
210
  } else {
161
211
  closeNav();
162
212
  }
163
213
  };
164
214
 
165
- navigationToggle.addEventListener('click', (e) => {
215
+ sidebarNavigationToggle.addEventListener('click', (e) => {
166
216
  e.stopPropagation();
167
217
  toggleNav();
168
218
  });
@@ -174,18 +224,20 @@ function hookSidebar() {
174
224
  // This is better than the opposite approach of hiding it with JavaScript
175
225
  // because it avoids flickering the sidebar when the page is loaded, especially on mobile devices
176
226
  if (isSmallViewport) {
227
+ closeNav();
228
+
177
229
  // Close nav when clicking links inside it
178
230
  document.addEventListener('click', (e) => {
179
- if (e.target.closest('#navigation a')) {
231
+ if (e.target.closest('#sidebar-navigation a')) {
180
232
  closeNav();
181
233
  }
182
234
  });
183
235
 
184
236
  // Close nav when clicking backdrop
185
237
  document.addEventListener('click', (e) => {
186
- if (!navigation.hidden &&
187
- !e.target.closest('#navigation') &&
188
- !e.target.closest('#navigation-toggle')) {
238
+ if (!sidebarNavigation.hidden &&
239
+ !e.target.closest('#sidebar-navigation') &&
240
+ !e.target.closest('#sidebar-navigation-toggle')) {
189
241
  closeNav();
190
242
  }
191
243
  });
@@ -233,7 +285,7 @@ function generateToc() {
233
285
  tocNav.appendChild(tocList);
234
286
  } else {
235
287
  // Hide TOC if no headings found
236
- const tocContainer = document.querySelector('.table-of-contents');
288
+ const tocContainer = document.querySelector('#table-of-contents');
237
289
  if (tocContainer) {
238
290
  tocContainer.style.display = 'none';
239
291
  }
@@ -326,78 +378,6 @@ function setHeadingSelfLinkScrollHandlers() {
326
378
  })
327
379
  }
328
380
 
329
- /* ===== Mobile Search Modal ===== */
330
-
331
- function hookSearchModal() {
332
- const searchToggle = document.querySelector('#search-toggle');
333
- const searchModal = document.querySelector('#search-modal');
334
- const searchModalClose = document.querySelector('#search-modal-close');
335
- const searchModalBackdrop = document.querySelector('.search-modal-backdrop');
336
- const searchInput = document.querySelector('#search-field-mobile');
337
- const searchResults = document.querySelector('#search-results-mobile');
338
- const searchEmpty = document.querySelector('.search-modal-empty');
339
-
340
- if (!searchToggle || !searchModal) return;
341
-
342
- // Initialize search for mobile modal
343
- const mobileSearch = createSearchInstance(searchInput, searchResults);
344
- if (!mobileSearch) return;
345
-
346
- // Hide empty state when there are results
347
- const originalRenderItem = mobileSearch.renderItem;
348
- mobileSearch.renderItem = function(result) {
349
- if (searchEmpty) searchEmpty.style.display = 'none';
350
- return originalRenderItem.call(this, result);
351
- };
352
-
353
- const openSearchModal = () => {
354
- searchModal.hidden = false;
355
- document.body.style.overflow = 'hidden';
356
- // Focus input after animation
357
- setTimeout(() => {
358
- if (searchInput) searchInput.focus();
359
- }, 100);
360
- };
361
-
362
- const closeSearchModal = () => {
363
- searchModal.hidden = true;
364
- document.body.style.overflow = '';
365
- };
366
-
367
- // Open on button click
368
- searchToggle.addEventListener('click', openSearchModal);
369
-
370
- // Close on close button click
371
- if (searchModalClose) {
372
- searchModalClose.addEventListener('click', closeSearchModal);
373
- }
374
-
375
- // Close on backdrop click
376
- if (searchModalBackdrop) {
377
- searchModalBackdrop.addEventListener('click', closeSearchModal);
378
- }
379
-
380
- // Close on Escape key
381
- document.addEventListener('keydown', (e) => {
382
- if (e.key === 'Escape' && !searchModal.hidden) {
383
- closeSearchModal();
384
- }
385
- });
386
-
387
- // Check for ?q= URL parameter on mobile and open modal
388
- if (typeof URLSearchParams !== 'undefined') {
389
- const urlParams = new URLSearchParams(window.location.search);
390
- const queryParam = urlParams.get('q');
391
- const isSmallViewport = window.matchMedia("(max-width: 1023px)").matches;
392
-
393
- if (queryParam && isSmallViewport) {
394
- openSearchModal();
395
- searchInput.value = queryParam;
396
- mobileSearch.search(queryParam, false);
397
- }
398
- }
399
- }
400
-
401
381
  /* ===== Code Block Copy Functionality ===== */
402
382
 
403
383
  function createCopyButton() {
@@ -435,8 +415,8 @@ function wrapCodeBlocksWithCopyButton() {
435
415
  // not directly in rhtml templates
436
416
  // - Modifying the formatter would require extending RDoc's core internals
437
417
 
438
- // Find all pre elements that are not already wrapped
439
- const preElements = document.querySelectorAll('main pre:not(.code-block-wrapper pre)');
418
+ // Target code examples and source code; skip type signature blocks
419
+ const preElements = document.querySelectorAll('main pre:not(.method-type-signature)');
440
420
 
441
421
  preElements.forEach((pre) => {
442
422
  // Skip if already wrapped
@@ -501,11 +481,9 @@ function showCopySuccess(button) {
501
481
  document.addEventListener('DOMContentLoaded', () => {
502
482
  hookSourceViews();
503
483
  hookSearch();
504
- hookFocus();
505
484
  hookSidebar();
506
485
  generateToc();
507
486
  setHeadingSelfLinkScrollHandlers();
508
487
  hookTocActiveHighlighting();
509
- hookSearchModal();
510
488
  wrapCodeBlocksWithCopyButton();
511
489
  });
@@ -3,7 +3,7 @@
3
3
  <%= render '_header.rhtml' %>
4
4
  <%= render '_sidebar_toggle.rhtml' %>
5
5
 
6
- <nav id="navigation" role="navigation" hidden>
6
+ <nav id="sidebar-navigation" role="navigation" hidden>
7
7
  <%= render '_sidebar_pages.rhtml' %>
8
8
  <%= render '_sidebar_classes.rhtml' %>
9
9
  </nav>
@@ -1,7 +1,7 @@
1
1
  <body role="document">
2
2
  <%= render '_sidebar_toggle.rhtml' %>
3
3
 
4
- <nav id="navigation" role="navigation" hidden>
4
+ <nav id="sidebar-navigation" role="navigation" hidden>
5
5
  <%= render '_sidebar_pages.rhtml' %>
6
6
  <%= render '_sidebar_classes.rhtml' %>
7
7
  </nav>
@@ -1,7 +1,7 @@
1
1
  <body role="document">
2
2
  <%= render '_sidebar_toggle.rhtml' %>
3
3
 
4
- <nav id="navigation" role="navigation" hidden>
4
+ <nav id="sidebar-navigation" role="navigation" hidden>
5
5
  <div id="project-navigation">
6
6
  <div id="home-section" class="nav-section">
7
7
  <h2>
@@ -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? then %>
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,5 +1,5 @@
1
1
  <footer id="validator-badges" role="contentinfo">
2
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>
3
+ <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> <%= VERSION %>.</p>
4
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,14 +1,16 @@
1
- <%- unless klass.extends.empty? then %>
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
- <%- 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 %>
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? then %>
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
- <%- 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 %>
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>
@@ -5,7 +5,7 @@
5
5
  <%- installed.each do |name, href, exists, type, _| %>
6
6
  <%- next if type == :extra %>
7
7
  <li class="folder">
8
- <%- if exists then %>
8
+ <%- if exists %>
9
9
  <a href="<%= href %>"><%= h name %></a>
10
10
  <%- else %>
11
11
  <%= h name %>
@@ -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? then %>
5
+ <%- unless simple_files.empty? %>
6
6
  <div id="fileindex-section" class="nav-section">
7
7
  <h3>Pages</h3>
8
8
 
@@ -1,4 +1,4 @@
1
- <%- unless klass.sections.length == 1 then %>
1
+ <%- unless klass.sections.length == 1 %>
2
2
  <div id="sections-section" class="nav-section">
3
3
  <h3>Sections</h3>
4
4
 
@@ -1,11 +1,11 @@
1
- <%- comment = if current.respond_to? :comment_location then
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 then %>
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
- <li><% display_link.call heading %></li>
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 %>
@@ -45,7 +45,7 @@
45
45
  <%- klass.each_section do |section, constants, attributes| %>
46
46
  <span id="<%= section.legacy_aref %>" class="legacy-anchor"></span>
47
47
  <section id="<%= section.aref %>" class="documentation-section anchor-link">
48
- <%- if section.title then %>
48
+ <%- if section.title %>
49
49
  <header class="documentation-section-title">
50
50
  <h2>
51
51
  <%= section.title %>
@@ -56,13 +56,13 @@
56
56
  </header>
57
57
  <%- end %>
58
58
 
59
- <%- if section.comment then %>
59
+ <%- if section.comment %>
60
60
  <div>
61
61
  <%= section.description %>
62
62
  </div>
63
63
  <%- end %>
64
64
 
65
- <%- unless constants.empty? then %>
65
+ <%- unless constants.empty? %>
66
66
  <section class="constants-list">
67
67
  <header>
68
68
  <h3>Constants</h3>
@@ -70,9 +70,9 @@
70
70
  <dl>
71
71
  <%- constants.each do |const| %>
72
72
  <dt id="<%= const.name %>"><%= const.name %></dt>
73
- <%- if const.comment then %>
73
+ <%- if const.comment %>
74
74
  <dd>
75
- <%- if const.mixin_from then %>
75
+ <%- if const.mixin_from %>
76
76
  <div class="mixin-from">
77
77
  Included from <a href="<%= klass.aref_to(const.mixin_from.path) %>"><%= const.mixin_from.full_name %></a>
78
78
  </div>
@@ -87,7 +87,7 @@
87
87
  </section>
88
88
  <%- end %>
89
89
 
90
- <%- unless attributes.empty? then %>
90
+ <%- unless attributes.empty? %>
91
91
  <section class="attribute-method-details method-section">
92
92
  <header>
93
93
  <h3>Attributes</h3>
@@ -103,12 +103,12 @@
103
103
  </div>
104
104
 
105
105
  <div class="method-description">
106
- <%- if attrib.mixin_from then %>
106
+ <%- if attrib.mixin_from %>
107
107
  <div class="mixin-from">
108
108
  <%= attrib.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(attrib.mixin_from.path) %>"><%= attrib.mixin_from.full_name %></a>
109
109
  </div>
110
110
  <%- end %>
111
- <%- if attrib.comment then %>
111
+ <%- if attrib.comment %>
112
112
  <%= attrib.description.strip %>
113
113
  <%- else %>
114
114
  <p class="missing-docs">(Not documented)</p>
@@ -131,7 +131,7 @@
131
131
  <%- methods.each do |method| %>
132
132
  <div id="<%= method.aref %>" class="method-detail anchor-link <%= method.is_alias_for ? "method-alias" : '' %>">
133
133
  <div class="method-header">
134
- <%- if (call_seq = method.call_seq) then %>
134
+ <%- if (call_seq = method.call_seq) %>
135
135
  <%- call_seq.strip.split("\n").each_with_index do |call_seq, i| %>
136
136
  <div class="method-heading">
137
137
  <a href="#<%= method.aref %>" title="Link to this method">
@@ -143,7 +143,7 @@
143
143
  </a>
144
144
  </div>
145
145
  <%- end %>
146
- <%- elsif method.has_call_seq? then %>
146
+ <%- elsif method.has_call_seq? %>
147
147
  <div class="method-heading">
148
148
  <a href="#<%= method.aref %>" title="Link to this method">
149
149
  <span class="method-name"><%= h method.name %></span>
@@ -170,31 +170,28 @@
170
170
  </div>
171
171
  <%- end %>
172
172
 
173
- <%- unless method.skip_description? then %>
173
+ <%- unless method.skip_description? %>
174
174
  <div class="method-description">
175
- <%- if method.mixin_from then %>
175
+ <%- if method.mixin_from %>
176
176
  <div class="mixin-from">
177
177
  <%= method.singleton ? "Extended" : "Included" %> from <a href="<%= klass.aref_to(method.mixin_from.path) %>"><%= method.mixin_from.full_name %></a>
178
178
  </div>
179
179
  <%- end %>
180
- <%- if method.comment then %>
180
+ <%- if method.comment %>
181
181
  <%= method.description.strip %>
182
182
  <%- else %>
183
183
  <p class="missing-docs">(Not documented)</p>
184
184
  <%- end %>
185
- <%- if method.calls_super then %>
185
+ <%- if method.calls_super %>
186
186
  <div class="method-calls-super">
187
187
  Calls superclass method
188
- <%=
189
- method.superclass_method ?
190
- method.formatter.link(method.superclass_method.full_name, method.superclass_method.full_name) : nil
191
- %>
188
+ <%= method.superclass_method_link %>
192
189
  </div>
193
190
  <%- end %>
194
191
  </div>
195
192
  <%- end %>
196
193
 
197
- <%- unless method.aliases.empty? then %>
194
+ <%- unless method.aliases.empty? %>
198
195
  <div class="aliases">
199
196
  Also aliased as: <%= method.aliases.map do |aka|
200
197
  if aka.parent then # HACK lib/rexml/encodings
@@ -206,7 +203,7 @@
206
203
  </div>
207
204
  <%- end %>
208
205
 
209
- <%- if method.is_alias_for then %>
206
+ <%- if method.is_alias_for %>
210
207
  <div class="aliases">
211
208
  Alias for: <a href="<%= klass.aref_to method.is_alias_for.path %>"><%= h method.is_alias_for.name %></a>
212
209
  </div>
@@ -449,7 +449,6 @@ main h6 {
449
449
  .ruby-ivar { color: #B57614; } /* Brown */
450
450
  .ruby-operator { color: #427B58; } /* Dark Teal */
451
451
  .ruby-identifier { color: #076678; } /* Deep Teal */
452
- .ruby-node { color: #8F3F71; } /* Plum */
453
452
  .ruby-comment { color: #928374; font-style: italic; } /* Gray */
454
453
  .ruby-regexp { color: #8F3F71; } /* Plum */
455
454
  .ruby-value { color: #AF3A03; } /* Dark Orange */
@@ -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? then %>
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? then %>
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? then %>
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 %>