shenanigans 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +5 -0
- data/LICENSE +7 -0
- data/README.rdoc +57 -0
- data/doc/Array.html +240 -0
- data/doc/Kernel.html +283 -0
- data/doc/Object.html +179 -0
- data/doc/README_rdoc.html +174 -0
- data/doc/created.rid +12 -0
- data/doc/images/add.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +173 -0
- data/doc/js/darkfish.js +153 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/rdoc.css +543 -0
- data/doc/table_of_contents.html +82 -0
- data/lib/shenanigans/README.mdown +57 -0
- data/lib/shenanigans/array/random_subarray.rb +16 -0
- data/lib/shenanigans/array/zip_with.rb +27 -0
- data/lib/shenanigans/array.rb +2 -0
- data/lib/shenanigans/kernel/fn.rb +16 -0
- data/lib/shenanigans/kernel/prompt.rb +23 -0
- data/lib/shenanigans/kernel/with.rb +12 -0
- data/lib/shenanigans/kernel.rb +3 -0
- data/lib/shenanigans/object/identity.rb +9 -0
- data/lib/shenanigans/object.rb +1 -0
- data/lib/shenanigans/shenanigans-0.0.1.gem +0 -0
- data/lib/shenanigans.rb +3 -0
- data/test/array/test_random_subarray.rb +10 -0
- data/test/array/test_zip_with.rb +14 -0
- data/test/kernel/test_fn.rb +14 -0
- data/test/kernel/test_prompt.rb +27 -0
- data/test/kernel/test_with.rb +12 -0
- data/test/object/test_identity.rb +9 -0
- metadata +103 -0
data/doc/Object.html
ADDED
@@ -0,0 +1,179 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>class Object - Shenanigans</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "./";
|
13
|
+
</script>
|
14
|
+
|
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 id="top" class="class">
|
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
|
+
|
33
|
+
|
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>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
45
|
+
|
46
|
+
<div id="file-metadata">
|
47
|
+
<nav id="file-list-section" class="section">
|
48
|
+
<h3 class="section-header">Defined In</h3>
|
49
|
+
<ul>
|
50
|
+
<li>lib/shenanigans/object/identity.rb
|
51
|
+
</ul>
|
52
|
+
</nav>
|
53
|
+
|
54
|
+
|
55
|
+
</div>
|
56
|
+
|
57
|
+
<div id="class-metadata">
|
58
|
+
|
59
|
+
<nav id="parent-class-section" class="section">
|
60
|
+
<h3 class="section-header">Parent</h3>
|
61
|
+
|
62
|
+
<p class="link">BasicObject
|
63
|
+
|
64
|
+
</nav>
|
65
|
+
|
66
|
+
|
67
|
+
<!-- Method Quickref -->
|
68
|
+
<nav id="method-list-section" class="section">
|
69
|
+
<h3 class="section-header">Methods</h3>
|
70
|
+
|
71
|
+
<ul class="link-list">
|
72
|
+
|
73
|
+
<li><a href="#method-i-identity">#identity</a>
|
74
|
+
|
75
|
+
</ul>
|
76
|
+
</nav>
|
77
|
+
|
78
|
+
</div>
|
79
|
+
|
80
|
+
<div id="project-metadata">
|
81
|
+
<nav id="fileindex-section" class="section project-section">
|
82
|
+
<h3 class="section-header">Pages</h3>
|
83
|
+
|
84
|
+
<ul>
|
85
|
+
|
86
|
+
<li class="file"><a href="./README_rdoc.html">README</a>
|
87
|
+
|
88
|
+
</ul>
|
89
|
+
</nav>
|
90
|
+
|
91
|
+
<nav id="classindex-section" class="section project-section">
|
92
|
+
<h3 class="section-header">Class and Module Index</h3>
|
93
|
+
|
94
|
+
<ul class="link-list">
|
95
|
+
|
96
|
+
<li><a href="./Array.html">Array</a>
|
97
|
+
|
98
|
+
<li><a href="./Kernel.html">Kernel</a>
|
99
|
+
|
100
|
+
<li><a href="./Object.html">Object</a>
|
101
|
+
|
102
|
+
</ul>
|
103
|
+
</nav>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
</nav>
|
107
|
+
|
108
|
+
<div id="documentation">
|
109
|
+
<h1 class="class">class Object</h1>
|
110
|
+
|
111
|
+
<div id="description" class="description">
|
112
|
+
|
113
|
+
</div><!-- description -->
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
<!-- Methods -->
|
128
|
+
|
129
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
130
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
131
|
+
|
132
|
+
|
133
|
+
<div id="method-i-identity" class="method-detail ">
|
134
|
+
|
135
|
+
<div class="method-heading">
|
136
|
+
<span class="method-name">identity</span><span
|
137
|
+
class="method-args">()</span>
|
138
|
+
<span class="method-click-advice">click to toggle source</span>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
|
142
|
+
<div class="method-description">
|
143
|
+
|
144
|
+
<p>An identity method that provides access to an object’s <code>self</code>.</p>
|
145
|
+
|
146
|
+
<pre class="ruby">[<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>,<span class="ruby-value">4</span>,<span class="ruby-value">5</span>,<span class="ruby-value">1</span>,<span class="ruby-value">2</span>,<span class="ruby-value">2</span>,<span class="ruby-value">3</span>].<span class="ruby-identifier">group_by</span>(&:<span class="ruby-identifier">identity</span>)
|
147
|
+
<span class="ruby-comment">#=> {1=>[1, 1], 2=>[2, 2, 2], 3=>[3, 3], 4=>[4], 5=>[5]}</span>
|
148
|
+
</pre>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
<div class="method-source-code" id="identity-source">
|
153
|
+
<pre><span class="ruby-comment"># File lib/shenanigans/object/identity.rb, line 6</span>
|
154
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">identity</span>
|
155
|
+
<span class="ruby-keyword">self</span>
|
156
|
+
<span class="ruby-keyword">end</span></pre>
|
157
|
+
</div><!-- identity-source -->
|
158
|
+
|
159
|
+
</div>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
</div><!-- identity-method -->
|
165
|
+
|
166
|
+
|
167
|
+
</section><!-- public-instance-method-details -->
|
168
|
+
|
169
|
+
</section><!-- 5Buntitled-5D -->
|
170
|
+
|
171
|
+
</div><!-- documentation -->
|
172
|
+
|
173
|
+
|
174
|
+
<footer id="validator-badges">
|
175
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
176
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
177
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
178
|
+
</footer>
|
179
|
+
|
@@ -0,0 +1,174 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>README - Shenanigans</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "./";
|
13
|
+
</script>
|
14
|
+
|
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 class="file">
|
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
|
+
|
33
|
+
|
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>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
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>
|
51
|
+
|
52
|
+
<li class="file"><a href="./README_rdoc.html">README</a>
|
53
|
+
|
54
|
+
</ul>
|
55
|
+
</nav>
|
56
|
+
|
57
|
+
<nav id="classindex-section" class="section project-section">
|
58
|
+
<h3 class="section-header">Class and Module Index</h3>
|
59
|
+
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="./Array.html">Array</a>
|
63
|
+
|
64
|
+
<li><a href="./Kernel.html">Kernel</a>
|
65
|
+
|
66
|
+
<li><a href="./Object.html">Object</a>
|
67
|
+
|
68
|
+
</ul>
|
69
|
+
</nav>
|
70
|
+
|
71
|
+
</div>
|
72
|
+
</nav>
|
73
|
+
|
74
|
+
<div id="documentation" class="description">
|
75
|
+
|
76
|
+
<h1 id="label-Shenanigans">Shenanigans</h1>
|
77
|
+
|
78
|
+
<p><strong>shenanigan</strong> (plural shenanigans):</p>
|
79
|
+
<ol><li>
|
80
|
+
<p>Trickery, games; skulduggery. To “call”, “claim” or “declare” shenanigans
|
81
|
+
is to rhetorically label something as officially deceitful, improper, or
|
82
|
+
otherwise incorrect. <em>“The advertisement said it would cost $50 but they
|
83
|
+
charged me $75 at the register. I declare shenanigans.”</em> The speaker
|
84
|
+
passes off the statement as having some sort of implied official effect,
|
85
|
+
but in reality, it is simply a complaint.</p>
|
86
|
+
</li><li>
|
87
|
+
<p>A deceitful confidence trick, or mischief causing discomfort or annoyance.
|
88
|
+
<em>You should learn to spot their shenanigans and avoid being fooled.</em></p>
|
89
|
+
</li><li>
|
90
|
+
<p>Mischievous play, especially by children.</p>
|
91
|
+
</li></ol>
|
92
|
+
|
93
|
+
<p>Source: <a
|
94
|
+
href="http://en.wiktionary.org/wiki/shenanigan#English">Wiktionary</a></p>
|
95
|
+
|
96
|
+
<h2 id="label-Introduction">Introduction</h2>
|
97
|
+
|
98
|
+
<p>Ruby Facets is the premiere collection of general purpose method extensions
|
99
|
+
and standard additions for the Ruby programming language. This is not Ruby
|
100
|
+
Facets though, so what you get is a random collection of methods I wrote
|
101
|
+
because I found them interesting and/or useful. Some of them I actually
|
102
|
+
also contributed to Facets, although sometimes they have different names or
|
103
|
+
slightly different implementations.</p>
|
104
|
+
|
105
|
+
<h2 id="label-Installation">Installation</h2>
|
106
|
+
|
107
|
+
<p>Shenanigans can be installed via <a
|
108
|
+
href="http://rubygems.org/">RubyGems</a>.</p>
|
109
|
+
|
110
|
+
<pre>$ gem install shenanigans</pre>
|
111
|
+
|
112
|
+
<p>I only works on 1.9.3 and I generally only test it with the most current
|
113
|
+
Ruby release.</p>
|
114
|
+
|
115
|
+
<h2 id="label-Usage">Usage</h2>
|
116
|
+
|
117
|
+
<p>If you really want the whole shebang, you can get it this way:</p>
|
118
|
+
|
119
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'shenanigans'</span>
|
120
|
+
</pre>
|
121
|
+
|
122
|
+
<p>Requiring a single method works as follows:</p>
|
123
|
+
|
124
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'shenanigans/<class|module>/<method>'</span>
|
125
|
+
</pre>
|
126
|
+
|
127
|
+
<p>Requiring all the extensions of a class or module also works:</p>
|
128
|
+
|
129
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'shenanigans/kernel'</span>
|
130
|
+
</pre>
|
131
|
+
|
132
|
+
<h2 id="label-Contribute">Contribute</h2>
|
133
|
+
|
134
|
+
<p>If you have something you want to contribute to Shenanigans, you shoud
|
135
|
+
reconsider and add it to Facets instead. This is a library for my own wonky
|
136
|
+
ideas and I don’t think it will ever see any real usage.</p>
|
137
|
+
|
138
|
+
<h2 id="label-Authors">Authors</h2>
|
139
|
+
|
140
|
+
<p>This project was created by Michael Kohl. He can be reached via email at
|
141
|
+
citizen428 at gmail.com.</p>
|
142
|
+
|
143
|
+
<h2 id="label-License">License</h2>
|
144
|
+
|
145
|
+
<p>Copyright © 2012 Michael Kohl</p>
|
146
|
+
|
147
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
148
|
+
copy of this software and associated documentation files (the “Software”),
|
149
|
+
to deal in the Software without restriction, including without limitation
|
150
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
151
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
152
|
+
Software is furnished to do so, subject to the following conditions:</p>
|
153
|
+
|
154
|
+
<p>The above copyright notice and this permission notice shall be included in
|
155
|
+
all copies or substantial portions of the Software.</p>
|
156
|
+
|
157
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
158
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
159
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
160
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
161
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
162
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
163
|
+
DEALINGS IN THE SOFTWARE.</p>
|
164
|
+
|
165
|
+
</div>
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
<footer id="validator-badges">
|
170
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
171
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
172
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
173
|
+
</footer>
|
174
|
+
|
data/doc/created.rid
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Thu, 17 May 2012 11:48:41 +0200
|
2
|
+
README.rdoc Thu, 17 May 2012 11:45:08 +0200
|
3
|
+
lib/shenanigans/array/random_subarray.rb Thu, 17 May 2012 00:03:23 +0200
|
4
|
+
lib/shenanigans/array/zip_with.rb Thu, 17 May 2012 00:12:10 +0200
|
5
|
+
lib/shenanigans/array.rb Wed, 16 May 2012 20:09:21 +0200
|
6
|
+
lib/shenanigans/kernel/fn.rb Wed, 16 May 2012 23:57:36 +0200
|
7
|
+
lib/shenanigans/kernel/prompt.rb Thu, 17 May 2012 00:10:42 +0200
|
8
|
+
lib/shenanigans/kernel/with.rb Thu, 17 May 2012 00:00:08 +0200
|
9
|
+
lib/shenanigans/kernel.rb Wed, 16 May 2012 20:49:22 +0200
|
10
|
+
lib/shenanigans/object/identity.rb Wed, 16 May 2012 23:51:07 +0200
|
11
|
+
lib/shenanigans/object.rb Wed, 16 May 2012 20:10:12 +0200
|
12
|
+
lib/shenanigans.rb Wed, 16 May 2012 21:04:23 +0200
|
data/doc/images/add.png
ADDED
Binary file
|
Binary file
|
Binary file
|
data/doc/images/bug.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/date.png
ADDED
Binary file
|
Binary file
|
data/doc/images/find.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/ruby.png
ADDED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/doc/images/zoom.png
ADDED
Binary file
|
data/doc/index.html
ADDED
@@ -0,0 +1,173 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
6
|
+
|
7
|
+
<title>Shenanigans</title>
|
8
|
+
|
9
|
+
<link type="text/css" media="screen" href="./rdoc.css" rel="stylesheet">
|
10
|
+
|
11
|
+
<script type="text/javascript">
|
12
|
+
var rdoc_rel_prefix = "./";
|
13
|
+
</script>
|
14
|
+
|
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
|
+
|
33
|
+
|
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>
|
41
|
+
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
43
|
+
</nav>
|
44
|
+
|
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>
|
51
|
+
|
52
|
+
<li class="file"><a href="./README_rdoc.html">README</a>
|
53
|
+
|
54
|
+
</ul>
|
55
|
+
</nav>
|
56
|
+
|
57
|
+
<nav id="classindex-section" class="section project-section">
|
58
|
+
<h3 class="section-header">Class and Module Index</h3>
|
59
|
+
|
60
|
+
<ul class="link-list">
|
61
|
+
|
62
|
+
<li><a href="./Array.html">Array</a>
|
63
|
+
|
64
|
+
<li><a href="./Kernel.html">Kernel</a>
|
65
|
+
|
66
|
+
<li><a href="./Object.html">Object</a>
|
67
|
+
|
68
|
+
</ul>
|
69
|
+
</nav>
|
70
|
+
|
71
|
+
</div>
|
72
|
+
</nav>
|
73
|
+
|
74
|
+
<div id="documentation" class="description">
|
75
|
+
|
76
|
+
<h1 id="label-Shenanigans">Shenanigans</h1>
|
77
|
+
|
78
|
+
<p><strong>shenanigan</strong> (plural shenanigans):</p>
|
79
|
+
<ol><li>
|
80
|
+
<p>Trickery, games; skulduggery. To “call”, “claim” or “declare” shenanigans
|
81
|
+
is to rhetorically label something as officially deceitful, improper, or
|
82
|
+
otherwise incorrect. <em>“The advertisement said it would cost $50 but they
|
83
|
+
charged me $75 at the register. I declare shenanigans.”</em> The speaker
|
84
|
+
passes off the statement as having some sort of implied official effect,
|
85
|
+
but in reality, it is simply a complaint.</p>
|
86
|
+
</li><li>
|
87
|
+
<p>A deceitful confidence trick, or mischief causing discomfort or annoyance.
|
88
|
+
<em>You should learn to spot their shenanigans and avoid being fooled.</em></p>
|
89
|
+
</li><li>
|
90
|
+
<p>Mischievous play, especially by children.</p>
|
91
|
+
</li></ol>
|
92
|
+
|
93
|
+
<p>Source: <a
|
94
|
+
href="http://en.wiktionary.org/wiki/shenanigan#English">Wiktionary</a></p>
|
95
|
+
|
96
|
+
<h2 id="label-Introduction">Introduction</h2>
|
97
|
+
|
98
|
+
<p>Ruby Facets is the premiere collection of general purpose method extensions
|
99
|
+
and standard additions for the Ruby programming language. This is not Ruby
|
100
|
+
Facets though, so what you get is a random collection of methods I wrote
|
101
|
+
because I found them interesting and/or useful. Some of them I actually
|
102
|
+
also contributed to Facets, although sometimes they have different names or
|
103
|
+
slightly different implementations.</p>
|
104
|
+
|
105
|
+
<h2 id="label-Installation">Installation</h2>
|
106
|
+
|
107
|
+
<p>Shenanigans can be installed via <a
|
108
|
+
href="http://rubygems.org/">RubyGems</a>.</p>
|
109
|
+
|
110
|
+
<pre>$ gem install shenanigans</pre>
|
111
|
+
|
112
|
+
<p>I only works on 1.9.3 and I generally only test it with the most current
|
113
|
+
Ruby release.</p>
|
114
|
+
|
115
|
+
<h2 id="label-Usage">Usage</h2>
|
116
|
+
|
117
|
+
<p>If you really want the whole shebang, you can get it this way:</p>
|
118
|
+
|
119
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'shenanigans'</span>
|
120
|
+
</pre>
|
121
|
+
|
122
|
+
<p>Requiring a single method works as follows:</p>
|
123
|
+
|
124
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'shenanigans/<class|module>/<method>'</span>
|
125
|
+
</pre>
|
126
|
+
|
127
|
+
<p>Requiring all the extensions of a class or module also works:</p>
|
128
|
+
|
129
|
+
<pre class="ruby"><span class="ruby-identifier">require</span> <span class="ruby-string">'shenanigans/kernel'</span>
|
130
|
+
</pre>
|
131
|
+
|
132
|
+
<h2 id="label-Contribute">Contribute</h2>
|
133
|
+
|
134
|
+
<p>If you have something you want to contribute to Shenanigans, you shoud
|
135
|
+
reconsider and add it to Facets instead. This is a library for my own wonky
|
136
|
+
ideas and I don’t think it will ever see any real usage.</p>
|
137
|
+
|
138
|
+
<h2 id="label-Authors">Authors</h2>
|
139
|
+
|
140
|
+
<p>This project was created by Michael Kohl. He can be reached via email at
|
141
|
+
citizen428 at gmail.com.</p>
|
142
|
+
|
143
|
+
<h2 id="label-License">License</h2>
|
144
|
+
|
145
|
+
<p>Copyright © 2012 Michael Kohl</p>
|
146
|
+
|
147
|
+
<p>Permission is hereby granted, free of charge, to any person obtaining a
|
148
|
+
copy of this software and associated documentation files (the “Software”),
|
149
|
+
to deal in the Software without restriction, including without limitation
|
150
|
+
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
151
|
+
and/or sell copies of the Software, and to permit persons to whom the
|
152
|
+
Software is furnished to do so, subject to the following conditions:</p>
|
153
|
+
|
154
|
+
<p>The above copyright notice and this permission notice shall be included in
|
155
|
+
all copies or substantial portions of the Software.</p>
|
156
|
+
|
157
|
+
<p>THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
158
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
159
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
160
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
161
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
162
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
163
|
+
DEALINGS IN THE SOFTWARE.</p>
|
164
|
+
|
165
|
+
</div>
|
166
|
+
|
167
|
+
|
168
|
+
<footer id="validator-badges">
|
169
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
170
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
171
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
172
|
+
</footer>
|
173
|
+
|