shenanigans 1.0.13 → 1.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +2 -1
  3. data/doc/Array.html +104 -74
  4. data/doc/Hash.html +77 -56
  5. data/doc/{Fixnum.html → Integer.html} +31 -27
  6. data/doc/Kernel.html +114 -74
  7. data/doc/Module.html +11 -15
  8. data/doc/Object.html +24 -95
  9. data/doc/String.html +31 -30
  10. data/doc/_index.html +13 -13
  11. data/doc/class_list.html +3 -3
  12. data/doc/css/style.css +6 -9
  13. data/doc/file.README.html +19 -48
  14. data/doc/file_list.html +2 -2
  15. data/doc/frames.html +2 -2
  16. data/doc/index.html +19 -48
  17. data/doc/js/app.js +69 -3
  18. data/doc/method_list.html +12 -20
  19. data/doc/top-level-namespace.html +7 -7
  20. data/lib/shenanigans.rb +7 -7
  21. data/lib/shenanigans/array.rb +3 -3
  22. data/lib/shenanigans/array/caret.rb +3 -2
  23. data/lib/shenanigans/array/random_subarray.rb +7 -5
  24. data/lib/shenanigans/array/reductions.rb +13 -10
  25. data/lib/shenanigans/array/zip_with.rb +9 -12
  26. data/lib/shenanigans/hash.rb +3 -3
  27. data/lib/shenanigans/hash/extract.rb +5 -4
  28. data/lib/shenanigans/hash/has_shape_pred.rb +6 -7
  29. data/lib/shenanigans/hash/to_ostruct.rb +8 -9
  30. data/lib/shenanigans/integer.rb +1 -0
  31. data/lib/shenanigans/integer/string_length.rb +13 -0
  32. data/lib/shenanigans/kernel.rb +4 -4
  33. data/lib/shenanigans/kernel/fn.rb +7 -6
  34. data/lib/shenanigans/kernel/prompt.rb +6 -7
  35. data/lib/shenanigans/kernel/require_optional.rb +8 -8
  36. data/lib/shenanigans/kernel/with.rb +4 -3
  37. data/lib/shenanigans/module.rb +1 -1
  38. data/lib/shenanigans/module/private_accessor.rb +6 -6
  39. data/lib/shenanigans/object.rb +1 -2
  40. data/lib/shenanigans/object/display.rb +5 -4
  41. data/lib/shenanigans/string.rb +2 -2
  42. data/lib/shenanigans/string/cmpi.rb +4 -3
  43. data/lib/shenanigans/string/in_groups_of.rb +4 -6
  44. data/test/array/caret_test.rb +9 -0
  45. data/test/array/{test_random_subarray.rb → random_subarray_test.rb} +3 -3
  46. data/test/array/reductions_test.rb +27 -0
  47. data/test/array/zip_with_test.rb +14 -0
  48. data/test/hash/extract_test.rb +11 -0
  49. data/test/hash/{test_has_shape_pred.rb → has_shape_pred_test.rb} +3 -3
  50. data/test/hash/{test_to_ostruct.rb → to_ostruct_test.rb} +3 -3
  51. data/test/integer/string_length_test.rb +16 -0
  52. data/test/kernel/fn_test.rb +14 -0
  53. data/test/kernel/{test_prompt.rb → prompt_test.rb} +4 -4
  54. data/test/kernel/require_optional_test.rb +15 -0
  55. data/test/kernel/with_test.rb +12 -0
  56. data/test/module/{test_private_accessor.rb → private_accessor_test.rb} +3 -3
  57. data/test/object/{test_display.rb → display_test.rb} +4 -5
  58. data/test/string/{test_cmpi.rb → cmpi_test.rb} +3 -3
  59. data/test/string/in_groups_of_test.rb +11 -0
  60. metadata +22 -25
  61. data/lib/shenanigans/fixnum.rb +0 -1
  62. data/lib/shenanigans/fixnum/string_length.rb +0 -14
  63. data/lib/shenanigans/object/it.rb +0 -9
  64. data/test/array/test_caret.rb +0 -9
  65. data/test/array/test_reductions.rb +0 -27
  66. data/test/array/test_zip_with.rb +0 -14
  67. data/test/fixnum/test_string_length.rb +0 -16
  68. data/test/hash/test_extract.rb +0 -11
  69. data/test/kernel/test_fn.rb +0 -14
  70. data/test/kernel/test_require_optional.rb +0 -17
  71. data/test/kernel/test_with.rb +0 -12
  72. data/test/object/test_it.rb +0 -10
  73. data/test/string/test_in_groups_of.rb +0 -11
@@ -4,9 +4,9 @@
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <meta charset="utf-8" />
6
6
 
7
- <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
8
8
 
9
- <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
10
10
 
11
11
 
12
12
 
@@ -43,7 +43,7 @@
43
43
 
44
44
  <ul id="full_list" class="class">
45
45
  <li id="object_" class="odd"><div class="item" style="padding-left:30px"><span class='object_link'><a href="top-level-namespace.html" title="Top Level Namespace (root)">Top Level Namespace</a></span></div></li>
46
- <li id='object_Array' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Array.html" title="Array (class)">Array</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Fixnum' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Fixnum.html" title="Fixnum (class)">Fixnum</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Hash' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Hash.html" title="Hash (class)">Hash</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Kernel' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Kernel.html" title="Kernel (module)">Kernel</a></span><small class='search_info'>Top Level Namespace</small></div></li><li id='object_Module' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Module.html" title="Module (class)">Module</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Object' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span> &lt; BasicObject<small class='search_info'>Top Level Namespace</small></div></li><li id='object_String' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="String.html" title="String (class)">String</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li>
46
+ <li id='object_Array' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Array.html" title="Array (class)">Array</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Hash' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Hash.html" title="Hash (class)">Hash</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Integer' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Integer.html" title="Integer (class)">Integer</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Kernel' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Kernel.html" title="Kernel (module)">Kernel</a></span><small class='search_info'>Top Level Namespace</small></div></li><li id='object_Module' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Module.html" title="Module (class)">Module</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li><li id='object_Object' class='odd'><div class='item' style='padding-left:30px'><span class='object_link'><a href="Object.html" title="Object (class)">Object</a></span> &lt; BasicObject<small class='search_info'>Top Level Namespace</small></div></li><li id='object_String' class='even'><div class='item' style='padding-left:30px'><span class='object_link'><a href="String.html" title="String (class)">String</a></span> &lt; Object<small class='search_info'>Top Level Namespace</small></div></li>
47
47
 
48
48
  </ul>
49
49
  </div>
@@ -245,6 +245,7 @@ ul.toplevel { list-style: none; padding-left: 0; font-size: 1.1em; }
245
245
 
246
246
  dl.constants { margin-left: 10px; }
247
247
  dl.constants dt { font-weight: bold; font-size: 1.1em; margin-bottom: 5px; }
248
+ dl.constants.compact dt { display: inline-block; font-weight: normal }
248
249
  dl.constants dd { width: 75%; white-space: pre; font-family: monospace; margin-bottom: 18px; }
249
250
  dl.constants .docstring .note:first-child { margin-top: 5px; }
250
251
 
@@ -326,13 +327,9 @@ ul.summary a, ul.summary a:visited {
326
327
  text-decoration: none; font-size: 1.1em;
327
328
  }
328
329
  ul.summary li { margin-bottom: 5px; }
329
- .summary .summary_signature {
330
- padding: 4px 8px;
331
- background: #f8f8f8;
332
- border: 1px solid #f0f0f0;
333
- border-radius: 5px;
334
- }
330
+ .summary_signature { padding: 4px 8px; background: #f8f8f8; border: 1px solid #f0f0f0; border-radius: 5px; }
335
331
  .summary_signature:hover { background: #CFEBFF; border-color: #A4CCDA; cursor: pointer; }
332
+ .summary_signature.deprecated { background: #ffe5e5; border-color: #e9dada; }
336
333
  ul.summary.compact li { display: inline-block; margin: 0px 5px 0px 0px; line-height: 2.6em;}
337
334
  ul.summary.compact .summary_signature { padding: 5px 7px; padding-right: 4px; }
338
335
  #content .summary_signature:hover a,
@@ -425,8 +422,8 @@ li.r2 { background: #fafafa; }
425
422
  #toc ol { padding-left: 1.8em; }
426
423
  #toc li { font-size: 1.1em; line-height: 1.7em; }
427
424
  #toc > ol > li { font-size: 1.1em; font-weight: bold; }
428
- #toc ol > ol { font-size: 0.9em; }
429
- #toc ol ol > ol { padding-left: 2.3em; }
425
+ #toc ol > li > ol { font-size: 0.9em; }
426
+ #toc ol ol > li > ol { padding-left: 2.3em; }
430
427
  #toc ol + li { margin-top: 0.3em; }
431
428
  #toc.hidden { padding: 10px; background: #fefefe; box-shadow: none; }
432
429
  #toc.hidden:hover { background: #fafafa; }
@@ -485,7 +482,7 @@ pre.code .rubyid_nth_ref { color: #6D79DE; }
485
482
  pre.code .regexp, .dregexp { color: #036A07; }
486
483
  pre.code a { border-bottom: 1px dotted #bbf; }
487
484
  /* inline code */
488
- p > code {
485
+ *:not(pre) > code {
489
486
  padding: 1px 3px 1px 3px;
490
487
  border: 1px solid #E1E1E8;
491
488
  background: #F7F7F9;
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.12
9
+ &mdash; Documentation by YARD 0.9.24
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "README";
19
19
  relpath = '';
20
20
  </script>
@@ -62,41 +62,27 @@
62
62
 
63
63
  <p><strong>shenanigan</strong> (plural shenanigans):</p>
64
64
  <ol><li>
65
- <p>Trickery, games; skulduggery. To “call”, “claim” or “declare” shenanigans
66
- is to rhetorically label something as officially deceitful, improper, or
67
- otherwise incorrect. <em>“The advertisement said it would cost $50 but they
68
- charged me $75 at the register. I declare shenanigans.”</em> The speaker
69
- passes off the statement as having some sort of implied official effect,
70
- but in reality, it is simply a complaint.</p>
65
+ <p>Trickery, games; skulduggery. To “call”, “claim” or “declare” shenanigans is to rhetorically label something as officially deceitful, improper, or otherwise incorrect. <em>“The advertisement said it would cost $50 but they charged me $75 at the register. I declare shenanigans.”</em> The speaker passes off the statement as having some sort of implied official effect, but in reality, it is simply a complaint.</p>
71
66
  </li><li>
72
- <p>A deceitful confidence trick, or mischief causing discomfort or annoyance.
73
- <em>You should learn to spot their shenanigans and avoid being fooled.</em></p>
67
+ <p>A deceitful confidence trick, or mischief causing discomfort or annoyance. <em>You should learn to spot their shenanigans and avoid being fooled.</em></p>
74
68
  </li><li>
75
69
  <p>Mischievous play, especially by children.</p>
76
70
  </li></ol>
77
71
 
78
- <p>Source: <a
79
- href="http://en.wiktionary.org/wiki/shenanigan#English">Wiktionary</a></p>
72
+ <p>Source: <a href="http://en.wiktionary.org/wiki/shenanigan#English">Wiktionary</a></p>
80
73
 
81
74
  <h2 id="label-Introduction">Introduction</h2>
82
75
 
83
- <p>Ruby Facets is the premiere collection of general purpose method extensions
84
- and standard additions for the Ruby programming language. This is not Ruby
85
- Facets though, so what you get is a random collection of methods I wrote
86
- because I found them interesting and/or useful. Some of them I actually
87
- also contributed to Facets, although sometimes they have different names or
88
- slightly different implementations.</p>
76
+ <p>Ruby Facets is the premiere collection of general purpose method extensions and standard additions for the Ruby programming language. This is not Ruby Facets though, so what you get is a random collection of methods I wrote because I found them interesting and/or useful. Some of them I actually also contributed to Facets, although sometimes they have different names or slightly different implementations.</p>
89
77
 
90
78
  <h2 id="label-Installation">Installation</h2>
91
79
 
92
- <p>Shenanigans can be installed via <a
93
- href="http://rubygems.org/">RubyGems</a>.</p>
80
+ <p>Shenanigans can be installed via <a href="http://rubygems.org/">RubyGems</a>.</p>
94
81
 
95
82
  <pre class="code ruby"><code class="ruby">$ gem install shenanigans
96
83
  </code></pre>
97
84
 
98
- <p>I only works on 1.9.3 and I generally only test it with the most current
99
- Ruby release.</p>
85
+ <p>I only works on 1.9.3 and I generally only test it with the most current Ruby release.</p>
100
86
 
101
87
  <h2 id="label-Usage">Usage</h2>
102
88
 
@@ -117,42 +103,27 @@ Ruby release.</p>
117
103
 
118
104
  <h2 id="label-Contribute">Contribute</h2>
119
105
 
120
- <p>If you have something you want to contribute to Shenanigans, you shoud
121
- reconsider and add it to Facets instead. This is a library for my own wonky
122
- ideas and I don&#39;t think it will ever see any real usage.</p>
106
+ <p>If you have something you want to contribute to Shenanigans, you shoud reconsider and add it to Facets instead. This is a library for my own wonky ideas and I don&#39;t think it will ever see any real usage.</p>
123
107
 
124
108
  <h2 id="label-Authors">Authors</h2>
125
109
 
126
- <p>This project was created by Michael Kohl. He can be reached via email at
127
- citizen428 at gmail.com.</p>
110
+ <p>This project was created by Michael Kohl. He can be reached via email at citizen428 at gmail.com.</p>
128
111
 
129
112
  <h2 id="label-License">License</h2>
130
113
 
131
114
  <p>Copyright © 2012-2014 Michael Kohl</p>
132
115
 
133
- <p>Permission is hereby granted, free of charge, to any person obtaining a
134
- copy of this software and associated documentation files (the “Software”),
135
- to deal in the Software without restriction, including without limitation
136
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
137
- and/or sell copies of the Software, and to permit persons to whom the
138
- Software is furnished to do so, subject to the following conditions:</p>
139
-
140
- <p>The above copyright notice and this permission notice shall be included in
141
- all copies or substantial portions of the Software.</p>
142
-
143
- <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
144
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
145
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
146
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
147
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
148
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
149
- DEALINGS IN THE SOFTWARE.</p>
116
+ <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
117
+
118
+ <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
119
+
120
+ <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
150
121
  </div></div>
151
122
 
152
123
  <div id="footer">
153
- Generated on Thu Feb 1 16:36:54 2018 by
124
+ Generated on Tue May 5 19:54:28 2020 by
154
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155
- 0.9.12 (ruby-2.5.0).
126
+ 0.9.24 (ruby-2.7.1).
156
127
  </div>
157
128
 
158
129
  </div>
@@ -4,9 +4,9 @@
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <meta charset="utf-8" />
6
6
 
7
- <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
8
8
 
9
- <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
10
10
 
11
11
 
12
12
 
@@ -2,9 +2,9 @@
2
2
  <html>
3
3
  <head>
4
4
  <meta charset="utf-8">
5
- <title>Documentation by YARD 0.9.12</title>
5
+ <title>Documentation by YARD 0.9.24</title>
6
6
  </head>
7
- <script type="text/javascript" charset="utf-8">
7
+ <script type="text/javascript">
8
8
  var match = unescape(window.location.hash).match(/^#!(.+)/);
9
9
  var name = match ? match[1] : 'index.html';
10
10
  name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
@@ -6,15 +6,15 @@
6
6
  <title>
7
7
  File: README
8
8
 
9
- &mdash; Documentation by YARD 0.9.12
9
+ &mdash; Documentation by YARD 0.9.24
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" />
14
14
 
15
- <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" />
16
16
 
17
- <script type="text/javascript" charset="utf-8">
17
+ <script type="text/javascript">
18
18
  pathId = "README";
19
19
  relpath = '';
20
20
  </script>
@@ -62,41 +62,27 @@
62
62
 
63
63
  <p><strong>shenanigan</strong> (plural shenanigans):</p>
64
64
  <ol><li>
65
- <p>Trickery, games; skulduggery. To “call”, “claim” or “declare” shenanigans
66
- is to rhetorically label something as officially deceitful, improper, or
67
- otherwise incorrect. <em>“The advertisement said it would cost $50 but they
68
- charged me $75 at the register. I declare shenanigans.”</em> The speaker
69
- passes off the statement as having some sort of implied official effect,
70
- but in reality, it is simply a complaint.</p>
65
+ <p>Trickery, games; skulduggery. To “call”, “claim” or “declare” shenanigans is to rhetorically label something as officially deceitful, improper, or otherwise incorrect. <em>“The advertisement said it would cost $50 but they charged me $75 at the register. I declare shenanigans.”</em> The speaker passes off the statement as having some sort of implied official effect, but in reality, it is simply a complaint.</p>
71
66
  </li><li>
72
- <p>A deceitful confidence trick, or mischief causing discomfort or annoyance.
73
- <em>You should learn to spot their shenanigans and avoid being fooled.</em></p>
67
+ <p>A deceitful confidence trick, or mischief causing discomfort or annoyance. <em>You should learn to spot their shenanigans and avoid being fooled.</em></p>
74
68
  </li><li>
75
69
  <p>Mischievous play, especially by children.</p>
76
70
  </li></ol>
77
71
 
78
- <p>Source: <a
79
- href="http://en.wiktionary.org/wiki/shenanigan#English">Wiktionary</a></p>
72
+ <p>Source: <a href="http://en.wiktionary.org/wiki/shenanigan#English">Wiktionary</a></p>
80
73
 
81
74
  <h2 id="label-Introduction">Introduction</h2>
82
75
 
83
- <p>Ruby Facets is the premiere collection of general purpose method extensions
84
- and standard additions for the Ruby programming language. This is not Ruby
85
- Facets though, so what you get is a random collection of methods I wrote
86
- because I found them interesting and/or useful. Some of them I actually
87
- also contributed to Facets, although sometimes they have different names or
88
- slightly different implementations.</p>
76
+ <p>Ruby Facets is the premiere collection of general purpose method extensions and standard additions for the Ruby programming language. This is not Ruby Facets though, so what you get is a random collection of methods I wrote because I found them interesting and/or useful. Some of them I actually also contributed to Facets, although sometimes they have different names or slightly different implementations.</p>
89
77
 
90
78
  <h2 id="label-Installation">Installation</h2>
91
79
 
92
- <p>Shenanigans can be installed via <a
93
- href="http://rubygems.org/">RubyGems</a>.</p>
80
+ <p>Shenanigans can be installed via <a href="http://rubygems.org/">RubyGems</a>.</p>
94
81
 
95
82
  <pre class="code ruby"><code class="ruby">$ gem install shenanigans
96
83
  </code></pre>
97
84
 
98
- <p>I only works on 1.9.3 and I generally only test it with the most current
99
- Ruby release.</p>
85
+ <p>I only works on 1.9.3 and I generally only test it with the most current Ruby release.</p>
100
86
 
101
87
  <h2 id="label-Usage">Usage</h2>
102
88
 
@@ -117,42 +103,27 @@ Ruby release.</p>
117
103
 
118
104
  <h2 id="label-Contribute">Contribute</h2>
119
105
 
120
- <p>If you have something you want to contribute to Shenanigans, you shoud
121
- reconsider and add it to Facets instead. This is a library for my own wonky
122
- ideas and I don&#39;t think it will ever see any real usage.</p>
106
+ <p>If you have something you want to contribute to Shenanigans, you shoud reconsider and add it to Facets instead. This is a library for my own wonky ideas and I don&#39;t think it will ever see any real usage.</p>
123
107
 
124
108
  <h2 id="label-Authors">Authors</h2>
125
109
 
126
- <p>This project was created by Michael Kohl. He can be reached via email at
127
- citizen428 at gmail.com.</p>
110
+ <p>This project was created by Michael Kohl. He can be reached via email at citizen428 at gmail.com.</p>
128
111
 
129
112
  <h2 id="label-License">License</h2>
130
113
 
131
114
  <p>Copyright © 2012-2014 Michael Kohl</p>
132
115
 
133
- <p>Permission is hereby granted, free of charge, to any person obtaining a
134
- copy of this software and associated documentation files (the “Software”),
135
- to deal in the Software without restriction, including without limitation
136
- the rights to use, copy, modify, merge, publish, distribute, sublicense,
137
- and/or sell copies of the Software, and to permit persons to whom the
138
- Software is furnished to do so, subject to the following conditions:</p>
139
-
140
- <p>The above copyright notice and this permission notice shall be included in
141
- all copies or substantial portions of the Software.</p>
142
-
143
- <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
144
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
145
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
146
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
147
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
148
- FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
149
- DEALINGS IN THE SOFTWARE.</p>
116
+ <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
117
+
118
+ <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
119
+
120
+ <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
150
121
  </div></div>
151
122
 
152
123
  <div id="footer">
153
- Generated on Thu Feb 1 16:36:54 2018 by
124
+ Generated on Tue May 5 19:54:28 2020 by
154
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
155
- 0.9.12 (ruby-2.5.0).
126
+ 0.9.24 (ruby-2.7.1).
156
127
  </div>
157
128
 
158
129
  </div>
@@ -120,6 +120,49 @@ function summaryToggle() {
120
120
  } else { localStorage.summaryCollapsed = "expand"; }
121
121
  }
122
122
 
123
+ function constantSummaryToggle() {
124
+ $('.constants_summary_toggle').click(function(e) {
125
+ e.preventDefault();
126
+ localStorage.summaryCollapsed = $(this).text();
127
+ $('.constants_summary_toggle').each(function() {
128
+ $(this).text($(this).text() == "collapse" ? "expand" : "collapse");
129
+ var next = $(this).parent().parent().nextAll('dl.constants').first();
130
+ if (next.hasClass('compact')) {
131
+ next.toggle();
132
+ next.nextAll('dl.constants').first().toggle();
133
+ }
134
+ else if (next.hasClass('constants')) {
135
+ var list = $('<dl class="constants compact" />');
136
+ list.html(next.html());
137
+ list.find('dt').each(function() {
138
+ $(this).addClass('summary_signature');
139
+ $(this).text( $(this).text().split('=')[0]);
140
+ if ($(this).has(".deprecated").length) {
141
+ $(this).addClass('deprecated');
142
+ };
143
+ });
144
+ // Add the value of the constant as "Tooltip" to the summary object
145
+ list.find('pre.code').each(function() {
146
+ console.log($(this).parent());
147
+ var dt_element = $(this).parent().prev();
148
+ var tooltip = $(this).text();
149
+ if (dt_element.hasClass("deprecated")) {
150
+ tooltip = 'Deprecated. ' + tooltip;
151
+ };
152
+ dt_element.attr('title', tooltip);
153
+ });
154
+ list.find('.docstring, .tags, dd').remove();
155
+ next.before(list);
156
+ next.toggle();
157
+ }
158
+ });
159
+ return false;
160
+ });
161
+ if (localStorage.summaryCollapsed == "collapse") {
162
+ $('.constants_summary_toggle').first().click();
163
+ } else { localStorage.summaryCollapsed = "expand"; }
164
+ }
165
+
123
166
  function generateTOC() {
124
167
  if ($('#filecontents').length === 0) return;
125
168
  var _toc = $('<ol class="top"></ol>');
@@ -128,6 +171,7 @@ function generateTOC() {
128
171
  var counter = 0;
129
172
  var tags = ['h2', 'h3', 'h4', 'h5', 'h6'];
130
173
  var i;
174
+ var curli;
131
175
  if ($('#filecontents h1').length > 1) tags.unshift('h1');
132
176
  for (i = 0; i < tags.length; i++) { tags[i] = '#filecontents ' + tags[i]; }
133
177
  var lastTag = parseInt(tags[0][1], 10);
@@ -147,15 +191,25 @@ function generateTOC() {
147
191
  }
148
192
  if (thisTag > lastTag) {
149
193
  for (i = 0; i < thisTag - lastTag; i++) {
150
- var tmp = $('<ol/>'); toc.append(tmp); toc = tmp;
194
+ if ( typeof(curli) == "undefined" ) {
195
+ curli = $('<li/>');
196
+ toc.append(curli);
197
+ }
198
+ toc = $('<ol/>');
199
+ curli.append(toc);
200
+ curli = undefined;
151
201
  }
152
202
  }
153
203
  if (thisTag < lastTag) {
154
- for (i = 0; i < lastTag - thisTag; i++) toc = toc.parent();
204
+ for (i = 0; i < lastTag - thisTag; i++) {
205
+ toc = toc.parent();
206
+ toc = toc.parent();
207
+ }
155
208
  }
156
209
  var title = $(this).attr('toc-title');
157
210
  if (typeof(title) == "undefined") title = $(this).text();
158
- toc.append('<li><a href="#' + this.id + '">' + title + '</a></li>');
211
+ curli =$('<li><a href="#' + this.id + '">' + title + '</a></li>');
212
+ toc.append(curli);
159
213
  lastTag = thisTag;
160
214
  });
161
215
  if (!show) return;
@@ -232,6 +286,16 @@ function mainFocus() {
232
286
  setTimeout(function() { $('#main').focus(); }, 10);
233
287
  }
234
288
 
289
+ function navigationChange() {
290
+ // This works around the broken anchor navigation with the YARD template.
291
+ window.onpopstate = function() {
292
+ var hash = window.location.hash;
293
+ if (hash !== '' && $(hash)[0]) {
294
+ $(hash)[0].scrollIntoView();
295
+ }
296
+ };
297
+ }
298
+
235
299
  $(document).ready(function() {
236
300
  navResizer();
237
301
  navExpander();
@@ -241,8 +305,10 @@ $(document).ready(function() {
241
305
  searchFrameButtons();
242
306
  linkSummaries();
243
307
  summaryToggle();
308
+ constantSummaryToggle();
244
309
  generateTOC();
245
310
  mainFocus();
311
+ navigationChange();
246
312
  });
247
313
 
248
314
  })();
@@ -4,9 +4,9 @@
4
4
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
5
5
  <meta charset="utf-8" />
6
6
 
7
- <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" />
8
8
 
9
- <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" />
10
10
 
11
11
 
12
12
 
@@ -101,14 +101,6 @@
101
101
 
102
102
 
103
103
  <li class="even ">
104
- <div class="item">
105
- <span class='object_link'><a href="Object.html#it-instance_method" title="Object#it (method)">#it</a></span>
106
- <small>Object</small>
107
- </div>
108
- </li>
109
-
110
-
111
- <li class="odd ">
112
104
  <div class="item">
113
105
  <span class='object_link'><a href="Module.html#private_accessor-instance_method" title="Module#private_accessor (method)">#private_accessor</a></span>
114
106
  <small>Module</small>
@@ -116,7 +108,7 @@
116
108
  </li>
117
109
 
118
110
 
119
- <li class="even ">
111
+ <li class="odd ">
120
112
  <div class="item">
121
113
  <span class='object_link'><a href="Kernel.html#prompt-instance_method" title="Kernel#prompt (method)">#prompt</a></span>
122
114
  <small>Kernel</small>
@@ -124,7 +116,7 @@
124
116
  </li>
125
117
 
126
118
 
127
- <li class="odd ">
119
+ <li class="even ">
128
120
  <div class="item">
129
121
  <span class='object_link'><a href="Array.html#random_subarray-instance_method" title="Array#random_subarray (method)">#random_subarray</a></span>
130
122
  <small>Array</small>
@@ -132,7 +124,7 @@
132
124
  </li>
133
125
 
134
126
 
135
- <li class="even ">
127
+ <li class="odd ">
136
128
  <div class="item">
137
129
  <span class='object_link'><a href="Array.html#reductions-instance_method" title="Array#reductions (method)">#reductions</a></span>
138
130
  <small>Array</small>
@@ -140,7 +132,7 @@
140
132
  </li>
141
133
 
142
134
 
143
- <li class="odd ">
135
+ <li class="even ">
144
136
  <div class="item">
145
137
  <span class='object_link'><a href="Kernel.html#require_optional-instance_method" title="Kernel#require_optional (method)">#require_optional</a></span>
146
138
  <small>Kernel</small>
@@ -148,15 +140,15 @@
148
140
  </li>
149
141
 
150
142
 
151
- <li class="even ">
143
+ <li class="odd ">
152
144
  <div class="item">
153
- <span class='object_link'><a href="Fixnum.html#string_length-instance_method" title="Fixnum#string_length (method)">#string_length</a></span>
154
- <small>Fixnum</small>
145
+ <span class='object_link'><a href="Integer.html#string_length-instance_method" title="Integer#string_length (method)">#string_length</a></span>
146
+ <small>Integer</small>
155
147
  </div>
156
148
  </li>
157
149
 
158
150
 
159
- <li class="odd ">
151
+ <li class="even ">
160
152
  <div class="item">
161
153
  <span class='object_link'><a href="Hash.html#to_ostruct-instance_method" title="Hash#to_ostruct (method)">#to_ostruct</a></span>
162
154
  <small>Hash</small>
@@ -164,7 +156,7 @@
164
156
  </li>
165
157
 
166
158
 
167
- <li class="even ">
159
+ <li class="odd ">
168
160
  <div class="item">
169
161
  <span class='object_link'><a href="Kernel.html#with-instance_method" title="Kernel#with (method)">#with</a></span>
170
162
  <small>Kernel</small>
@@ -172,7 +164,7 @@
172
164
  </li>
173
165
 
174
166
 
175
- <li class="odd ">
167
+ <li class="even ">
176
168
  <div class="item">
177
169
  <span class='object_link'><a href="Array.html#zip_with-instance_method" title="Array#zip_with (method)">#zip_with</a></span>
178
170
  <small>Array</small>