shenanigans 1.0.9 → 1.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -3
  3. data/README.rdoc +1 -1
  4. data/doc/Array.html +423 -202
  5. data/doc/Fixnum.html +155 -140
  6. data/doc/Hash.html +305 -206
  7. data/doc/Kernel.html +360 -249
  8. data/doc/Module.html +181 -153
  9. data/doc/Object.html +210 -201
  10. data/doc/String.html +166 -139
  11. data/doc/_index.html +188 -0
  12. data/doc/class_list.html +54 -0
  13. data/doc/css/common.css +1 -0
  14. data/doc/css/full_list.css +57 -0
  15. data/doc/css/style.css +338 -0
  16. data/doc/file.README.html +162 -0
  17. data/doc/file_list.html +56 -0
  18. data/doc/frames.html +26 -0
  19. data/doc/index.html +62 -80
  20. data/doc/js/app.js +219 -0
  21. data/doc/js/full_list.js +178 -0
  22. data/doc/js/jquery.js +4 -18
  23. data/doc/method_list.html +149 -0
  24. data/doc/top-level-namespace.html +114 -0
  25. data/lib/shenanigans.rb +3 -1
  26. data/lib/shenanigans/array.rb +3 -3
  27. data/lib/shenanigans/array/reductions.rb +29 -0
  28. data/lib/shenanigans/kernel.rb +4 -4
  29. data/lib/shenanigans/module.rb +1 -1
  30. data/lib/shenanigans/object.rb +2 -2
  31. data/lib/shenanigans/string.rb +1 -1
  32. data/test/array/test_reductions.rb +27 -0
  33. metadata +16 -36
  34. data/doc/README_rdoc.html +0 -199
  35. data/doc/created.rid +0 -25
  36. data/doc/images/add.png +0 -0
  37. data/doc/images/arrow_up.png +0 -0
  38. data/doc/images/brick.png +0 -0
  39. data/doc/images/brick_link.png +0 -0
  40. data/doc/images/bug.png +0 -0
  41. data/doc/images/bullet_black.png +0 -0
  42. data/doc/images/bullet_toggle_minus.png +0 -0
  43. data/doc/images/bullet_toggle_plus.png +0 -0
  44. data/doc/images/date.png +0 -0
  45. data/doc/images/delete.png +0 -0
  46. data/doc/images/find.png +0 -0
  47. data/doc/images/loadingAnimation.gif +0 -0
  48. data/doc/images/macFFBgHack.png +0 -0
  49. data/doc/images/package.png +0 -0
  50. data/doc/images/page_green.png +0 -0
  51. data/doc/images/page_white_text.png +0 -0
  52. data/doc/images/page_white_width.png +0 -0
  53. data/doc/images/plugin.png +0 -0
  54. data/doc/images/ruby.png +0 -0
  55. data/doc/images/tag_blue.png +0 -0
  56. data/doc/images/tag_green.png +0 -0
  57. data/doc/images/transparent.png +0 -0
  58. data/doc/images/wrench.png +0 -0
  59. data/doc/images/wrench_orange.png +0 -0
  60. data/doc/images/zoom.png +0 -0
  61. data/doc/js/darkfish.js +0 -155
  62. data/doc/js/navigation.js +0 -142
  63. data/doc/js/search.js +0 -94
  64. data/doc/js/search_index.js +0 -1
  65. data/doc/js/searcher.js +0 -228
  66. data/doc/rdoc.css +0 -595
  67. data/doc/table_of_contents.html +0 -114
@@ -0,0 +1,162 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ <title>
7
+ File: README
8
+
9
+ &mdash; Documentation by YARD 0.8.7.3
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="_index.html">Index</a> &raquo;
35
+ <span class="title">File: README</span>
36
+
37
+
38
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
39
+ </div>
40
+
41
+ <div id="search">
42
+
43
+ <a class="full_list_link" id="class_list_link"
44
+ href="class_list.html">
45
+ Class List
46
+ </a>
47
+
48
+ <a class="full_list_link" id="method_list_link"
49
+ href="method_list.html">
50
+ Method List
51
+ </a>
52
+
53
+ <a class="full_list_link" id="file_list_link"
54
+ href="file_list.html">
55
+ File List
56
+ </a>
57
+
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
61
+
62
+ <iframe id="search_frame"></iframe>
63
+
64
+ <div id="content"><div id='filecontents'>
65
+ <h1 id="label-Shenanigans">Shenanigans</h1>
66
+
67
+ <p><strong>shenanigan</strong> (plural shenanigans):</p>
68
+ <ol><li>
69
+ <p>Trickery, games; skulduggery. To “call”, “claim” or “declare” shenanigans
70
+ is to rhetorically label something as officially deceitful, improper, or
71
+ otherwise incorrect. <em>“The advertisement said it would cost $50 but they
72
+ charged me $75 at the register. I declare shenanigans.”</em> The speaker
73
+ passes off the statement as having some sort of implied official effect,
74
+ but in reality, it is simply a complaint.</p>
75
+ </li><li>
76
+ <p>A deceitful confidence trick, or mischief causing discomfort or annoyance.
77
+ <em>You should learn to spot their shenanigans and avoid being fooled.</em></p>
78
+ </li><li>
79
+ <p>Mischievous play, especially by children.</p>
80
+ </li></ol>
81
+
82
+ <p>Source: <a
83
+ href="http://en.wiktionary.org/wiki/shenanigan#English">Wiktionary</a></p>
84
+
85
+ <h2 id="label-Introduction">Introduction</h2>
86
+
87
+ <p>Ruby Facets is the premiere collection of general purpose method extensions
88
+ and standard additions for the Ruby programming language. This is not Ruby
89
+ Facets though, so what you get is a random collection of methods I wrote
90
+ because I found them interesting and/or useful. Some of them I actually
91
+ also contributed to Facets, although sometimes they have different names or
92
+ slightly different implementations.</p>
93
+
94
+ <h2 id="label-Installation">Installation</h2>
95
+
96
+ <p>Shenanigans can be installed via <a
97
+ href="http://rubygems.org/">RubyGems</a>.</p>
98
+
99
+ <pre class="code ruby"><code class="ruby">$ gem install shenanigans</code></pre>
100
+
101
+ <p>I only works on 1.9.3 and I generally only test it with the most current
102
+ Ruby release.</p>
103
+
104
+ <h2 id="label-Usage">Usage</h2>
105
+
106
+ <p>If you really want the whole shebang, you can get it this way:</p>
107
+
108
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shenanigans&#39;</span>
109
+ </pre>
110
+
111
+ <p>Requiring a single method works as follows:</p>
112
+
113
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shenanigans/&lt;class|module&gt;/&lt;method&gt;&#39;</span>
114
+ </pre>
115
+
116
+ <p>Requiring all the extensions of a class or module also works:</p>
117
+
118
+ <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shenanigans/kernel&#39;</span>
119
+ </pre>
120
+
121
+ <h2 id="label-Contribute">Contribute</h2>
122
+
123
+ <p>If you have something you want to contribute to Shenanigans, you shoud
124
+ reconsider and add it to Facets instead. This is a library for my own wonky
125
+ ideas and I don&#39;t think it will ever see any real usage.</p>
126
+
127
+ <h2 id="label-Authors">Authors</h2>
128
+
129
+ <p>This project was created by Michael Kohl. He can be reached via email at
130
+ citizen428 at gmail.com.</p>
131
+
132
+ <h2 id="label-License">License</h2>
133
+
134
+ <p>Copyright © 2012-2014 Michael Kohl</p>
135
+
136
+ <p>Permission is hereby granted, free of charge, to any person obtaining a
137
+ copy of this software and associated documentation files (the “Software”),
138
+ to deal in the Software without restriction, including without limitation
139
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
140
+ and/or sell copies of the Software, and to permit persons to whom the
141
+ Software is furnished to do so, subject to the following conditions:</p>
142
+
143
+ <p>The above copyright notice and this permission notice shall be included in
144
+ all copies or substantial portions of the Software.</p>
145
+
146
+ <p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
147
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
148
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
149
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
150
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
151
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
152
+ DEALINGS IN THE SOFTWARE.</p>
153
+ </div></div>
154
+
155
+ <div id="footer">
156
+ Generated on Tue Dec 31 15:41:29 2013 by
157
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
158
+ 0.8.7.3 (ruby-2.0.0).
159
+ </div>
160
+
161
+ </body>
162
+ </html>
@@ -0,0 +1,56 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html>
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+
7
+ <link rel="stylesheet" href="css/full_list.css" type="text/css" media="screen" charset="utf-8" />
8
+
9
+ <link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
10
+
11
+
12
+
13
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="js/full_list.js"></script>
16
+
17
+
18
+ <title>File List</title>
19
+ <base id="base_target" target="_parent" />
20
+ </head>
21
+ <body>
22
+ <script type="text/javascript" charset="utf-8">
23
+ if (window.top.frames.main) {
24
+ document.getElementById('base_target').target = 'main';
25
+ document.body.className = 'frames';
26
+ }
27
+ </script>
28
+ <div id="content">
29
+ <h1 id="full_list_header">File List</h1>
30
+ <div id="nav">
31
+
32
+ <span><a target="_self" href="class_list.html">
33
+ Classes
34
+ </a></span>
35
+
36
+ <span><a target="_self" href="method_list.html">
37
+ Methods
38
+ </a></span>
39
+
40
+ <span><a target="_self" href="file_list.html">
41
+ Files
42
+ </a></span>
43
+
44
+ </div>
45
+ <div id="search">Search: <input type="text" /></div>
46
+
47
+ <ul id="full_list" class="file">
48
+
49
+
50
+ <li class="r1"><span class="object_link"><a href="index.html" title="README">README</a></a></li>
51
+
52
+
53
+ </ul>
54
+ </div>
55
+ </body>
56
+ </html>
data/doc/frames.html ADDED
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
7
+ <title>Documentation by YARD 0.8.7.3</title>
8
+ </head>
9
+ <script type="text/javascript" charset="utf-8">
10
+ window.onload = function() {
11
+ var match = unescape(window.location.hash).match(/^#!(.+)/);
12
+ var name = match ? match[1] : 'index.html';
13
+ name = name.replace(/^(\w+):\/\//, '').replace(/^\/\//, '');
14
+ document.writeln('<frameset cols="20%,*">' +
15
+ '<frame name="list" src="class_list.html" />' +
16
+ '<frame name="main" src="' + escape(name) + '" />' +
17
+ '</frameset>');
18
+ }
19
+ </script>
20
+ <noscript>
21
+ <frameset cols="20%,*">
22
+ <frame name="list" src="class_list.html" />
23
+ <frame name="main" src="index.html" />
24
+ </frameset>
25
+ </noscript>
26
+ </html>
data/doc/index.html CHANGED
@@ -1,87 +1,68 @@
1
- <!DOCTYPE html>
2
-
3
- <html>
4
- <head>
5
- <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
6
+ <title>
7
+ File: README
8
+
9
+ &mdash; Documentation by YARD 0.8.7.3
10
+
11
+ </title>
6
12
 
7
- <title>Shenanigans</title>
13
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
8
14
 
9
- <link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
15
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
10
16
 
11
- <script type="text/javascript">
12
- var rdoc_rel_prefix = "./";
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
13
21
  </script>
14
22
 
15
- <script type="text/javascript" charset="utf-8" src="./js/jquery.js"></script>
16
- <script type="text/javascript" charset="utf-8" src="./js/navigation.js"></script>
17
- <script type="text/javascript" charset="utf-8" src="./js/search_index.js"></script>
18
- <script type="text/javascript" charset="utf-8" src="./js/search.js"></script>
19
- <script type="text/javascript" charset="utf-8" src="./js/searcher.js"></script>
20
- <script type="text/javascript" charset="utf-8" src="./js/darkfish.js"></script>
21
-
22
-
23
- <body>
24
- <nav id="metadata">
25
- <nav id="home-section" class="section">
26
- <h3 class="section-header">
27
- <a href="./index.html">Home</a>
28
- <a href="./table_of_contents.html#classes">Classes</a>
29
- <a href="./table_of_contents.html#methods">Methods</a>
30
- </h3>
31
- </nav>
32
23
 
24
+ <script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
33
25
 
34
- <nav id="search-section" class="section project-section" class="initially-hidden">
35
- <form action="#" method="get" accept-charset="utf-8">
36
- <h3 class="section-header">
37
- <input type="text" name="search" placeholder="Search" id="search-field"
38
- title="Type to search, Up and Down to navigate, Enter to load">
39
- </h3>
40
- </form>
26
+ <script type="text/javascript" charset="utf-8" src="js/app.js"></script>
41
27
 
42
- <ul id="search-results" class="initially-hidden"></ul>
43
- </nav>
44
28
 
45
-
46
- <div id="project-metadata">
47
- <nav id="fileindex-section" class="section project-section">
48
- <h3 class="section-header">Pages</h3>
49
-
50
- <ul>
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
51
33
 
52
- <li class="file"><a href="./README_rdoc.html">README</a>
34
+ <a href="_index.html">Index</a> &raquo;
35
+ <span class="title">File: README</span>
53
36
 
54
- </ul>
55
- </nav>
56
37
 
57
- <nav id="classindex-section" class="section project-section">
58
- <h3 class="section-header">Class and Module Index</h3>
38
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
39
+ </div>
59
40
 
60
- <ul class="link-list">
61
-
62
- <li><a href="./Array.html">Array</a>
41
+ <div id="search">
63
42
 
64
- <li><a href="./Fixnum.html">Fixnum</a>
43
+ <a class="full_list_link" id="class_list_link"
44
+ href="class_list.html">
45
+ Class List
46
+ </a>
65
47
 
66
- <li><a href="./Hash.html">Hash</a>
48
+ <a class="full_list_link" id="method_list_link"
49
+ href="method_list.html">
50
+ Method List
51
+ </a>
67
52
 
68
- <li><a href="./Kernel.html">Kernel</a>
53
+ <a class="full_list_link" id="file_list_link"
54
+ href="file_list.html">
55
+ File List
56
+ </a>
69
57
 
70
- <li><a href="./Module.html">Module</a>
71
-
72
- <li><a href="./Object.html">Object</a>
73
-
74
- <li><a href="./String.html">String</a>
75
-
76
- </ul>
77
- </nav>
78
-
79
- </div>
80
- </nav>
58
+ </div>
59
+ <div class="clear"></div>
60
+ </div>
81
61
 
82
- <div id="documentation" class="description">
62
+ <iframe id="search_frame"></iframe>
83
63
 
84
- <h1 id="label-Shenanigans">Shenanigans<span><a href="#label-Shenanigans">&para;</a> <a href="#documentation">&uarr;</a></span></h1>
64
+ <div id="content"><div id='filecontents'>
65
+ <h1 id="label-Shenanigans">Shenanigans</h1>
85
66
 
86
67
  <p><strong>shenanigan</strong> (plural shenanigans):</p>
87
68
  <ol><li>
@@ -101,7 +82,7 @@ but in reality, it is simply a complaint.</p>
101
82
  <p>Source: <a
102
83
  href="http://en.wiktionary.org/wiki/shenanigan#English">Wiktionary</a></p>
103
84
 
104
- <h2 id="label-Introduction">Introduction<span><a href="#label-Introduction">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
85
+ <h2 id="label-Introduction">Introduction</h2>
105
86
 
106
87
  <p>Ruby Facets is the premiere collection of general purpose method extensions
107
88
  and standard additions for the Ruby programming language. This is not Ruby
@@ -110,17 +91,17 @@ because I found them interesting and/or useful. Some of them I actually
110
91
  also contributed to Facets, although sometimes they have different names or
111
92
  slightly different implementations.</p>
112
93
 
113
- <h2 id="label-Installation">Installation<span><a href="#label-Installation">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
94
+ <h2 id="label-Installation">Installation</h2>
114
95
 
115
96
  <p>Shenanigans can be installed via <a
116
97
  href="http://rubygems.org/">RubyGems</a>.</p>
117
98
 
118
- <pre>$ gem install shenanigans</pre>
99
+ <pre class="code ruby"><code class="ruby">$ gem install shenanigans</code></pre>
119
100
 
120
101
  <p>I only works on 1.9.3 and I generally only test it with the most current
121
102
  Ruby release.</p>
122
103
 
123
- <h2 id="label-Usage">Usage<span><a href="#label-Usage">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
104
+ <h2 id="label-Usage">Usage</h2>
124
105
 
125
106
  <p>If you really want the whole shebang, you can get it this way:</p>
126
107
 
@@ -137,20 +118,20 @@ Ruby release.</p>
137
118
  <pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">&#39;shenanigans/kernel&#39;</span>
138
119
  </pre>
139
120
 
140
- <h2 id="label-Contribute">Contribute<span><a href="#label-Contribute">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
121
+ <h2 id="label-Contribute">Contribute</h2>
141
122
 
142
123
  <p>If you have something you want to contribute to Shenanigans, you shoud
143
124
  reconsider and add it to Facets instead. This is a library for my own wonky
144
125
  ideas and I don&#39;t think it will ever see any real usage.</p>
145
126
 
146
- <h2 id="label-Authors">Authors<span><a href="#label-Authors">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
127
+ <h2 id="label-Authors">Authors</h2>
147
128
 
148
129
  <p>This project was created by Michael Kohl. He can be reached via email at
149
130
  citizen428 at gmail.com.</p>
150
131
 
151
- <h2 id="label-License">License<span><a href="#label-License">&para;</a> <a href="#documentation">&uarr;</a></span></h2>
132
+ <h2 id="label-License">License</h2>
152
133
 
153
- <p>Copyright © 2012 Michael Kohl</p>
134
+ <p>Copyright © 2012-2014 Michael Kohl</p>
154
135
 
155
136
  <p>Permission is hereby granted, free of charge, to any person obtaining a
156
137
  copy of this software and associated documentation files (the “Software”),
@@ -169,12 +150,13 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
169
150
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
170
151
  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
171
152
  DEALINGS IN THE SOFTWARE.</p>
172
- </div>
153
+ </div></div>
173
154
 
155
+ <div id="footer">
156
+ Generated on Tue Dec 31 15:41:28 2013 by
157
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
158
+ 0.8.7.3 (ruby-2.0.0).
159
+ </div>
174
160
 
175
- <footer id="validator-badges">
176
- <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
177
- <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 4.0.0.
178
- <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
179
- </footer>
180
-
161
+ </body>
162
+ </html>