spoonerize 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/ruby.yml +24 -0
- data/.gitignore +1 -0
- data/Gemfile +7 -0
- data/LICENSE +21 -0
- data/README.md +106 -0
- data/Rakefile +19 -0
- data/_config.yml +1 -0
- data/bin/spoonerize +5 -0
- data/doc/README_md.html +200 -0
- data/doc/Spoonerize/Bumper.html +287 -0
- data/doc/Spoonerize/Cli.html +544 -0
- data/doc/Spoonerize/Log.html +362 -0
- data/doc/Spoonerize/Spoonerism.html +590 -0
- data/doc/Spoonerize.html +125 -0
- data/doc/created.rid +8 -0
- data/doc/css/fonts.css +167 -0
- data/doc/css/rdoc.css +619 -0
- data/doc/fonts/Lato-Light.ttf +0 -0
- data/doc/fonts/Lato-LightItalic.ttf +0 -0
- data/doc/fonts/Lato-Regular.ttf +0 -0
- data/doc/fonts/Lato-RegularItalic.ttf +0 -0
- data/doc/fonts/SourceCodePro-Bold.ttf +0 -0
- data/doc/fonts/SourceCodePro-Regular.ttf +0 -0
- data/doc/images/add.png +0 -0
- data/doc/images/arrow_up.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 +203 -0
- data/doc/js/darkfish.js +84 -0
- data/doc/js/navigation.js +105 -0
- data/doc/js/navigation.js.gz +0 -0
- data/doc/js/search.js +110 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/search_index.js.gz +0 -0
- data/doc/js/searcher.js +229 -0
- data/doc/js/searcher.js.gz +0 -0
- data/doc/table_of_contents.html +242 -0
- data/lib/config/lazy_words.yml +21 -0
- data/lib/spoonerize/bumper.rb +61 -0
- data/lib/spoonerize/cli.rb +158 -0
- data/lib/spoonerize/log.rb +68 -0
- data/lib/spoonerize/spoonerism.rb +166 -0
- data/lib/spoonerize/version.rb +5 -0
- data/lib/spoonerize.rb +21 -0
- data/pkg/spoonerize-0.0.7.gem +0 -0
- data/spoonerize.gemspec +38 -0
- metadata +154 -0
@@ -0,0 +1,287 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Spoonerize::Bumper - RDoc Documentation</title>
|
8
|
+
|
9
|
+
<script type="text/javascript">
|
10
|
+
var rdoc_rel_prefix = "../";
|
11
|
+
var index_rel_prefix = "../";
|
12
|
+
</script>
|
13
|
+
|
14
|
+
<script src="../js/navigation.js" defer></script>
|
15
|
+
<script src="../js/search.js" defer></script>
|
16
|
+
<script src="../js/search_index.js" defer></script>
|
17
|
+
<script src="../js/searcher.js" defer></script>
|
18
|
+
<script src="../js/darkfish.js" defer></script>
|
19
|
+
|
20
|
+
<link href="../css/fonts.css" rel="stylesheet">
|
21
|
+
<link href="../css/rdoc.css" rel="stylesheet">
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
|
26
|
+
<body id="top" role="document" class="class">
|
27
|
+
<nav role="navigation">
|
28
|
+
<div id="project-navigation">
|
29
|
+
<div id="home-section" role="region" title="Quick navigation" class="nav-section">
|
30
|
+
<h2>
|
31
|
+
<a href="../index.html" rel="home">Home</a>
|
32
|
+
</h2>
|
33
|
+
|
34
|
+
<div id="table-of-contents-navigation">
|
35
|
+
<a href="../table_of_contents.html#pages">Pages</a>
|
36
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
37
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
38
|
+
</div>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div id="search-section" role="search" class="project-section initially-hidden">
|
42
|
+
<form action="#" method="get" accept-charset="utf-8">
|
43
|
+
<div id="search-field-wrapper">
|
44
|
+
<input id="search-field" role="combobox" aria-label="Search"
|
45
|
+
aria-autocomplete="list" aria-controls="search-results"
|
46
|
+
type="text" name="search" placeholder="Search" spellcheck="false"
|
47
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<ul id="search-results" aria-label="Search Results"
|
51
|
+
aria-busy="false" aria-expanded="false"
|
52
|
+
aria-atomic="false" class="initially-hidden"></ul>
|
53
|
+
</form>
|
54
|
+
</div>
|
55
|
+
|
56
|
+
</div>
|
57
|
+
|
58
|
+
|
59
|
+
|
60
|
+
<div id="class-metadata">
|
61
|
+
|
62
|
+
<div id="parent-class-section" class="nav-section">
|
63
|
+
<h3>Parent</h3>
|
64
|
+
|
65
|
+
|
66
|
+
<p class="link">Object
|
67
|
+
|
68
|
+
</div>
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
<!-- Method Quickref -->
|
73
|
+
<div id="method-list-section" class="nav-section">
|
74
|
+
<h3>Methods</h3>
|
75
|
+
|
76
|
+
<ul class="link-list" role="directory">
|
77
|
+
|
78
|
+
<li ><a href="#method-c-new">::new</a>
|
79
|
+
|
80
|
+
<li ><a href="#method-i-bump">#bump</a>
|
81
|
+
|
82
|
+
<li ><a href="#method-i-reverse-3F">#reverse?</a>
|
83
|
+
|
84
|
+
</ul>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
</nav>
|
89
|
+
|
90
|
+
<main role="main" aria-labelledby="class-Spoonerize::Bumper">
|
91
|
+
<h1 id="class-Spoonerize::Bumper" class="class">
|
92
|
+
class Spoonerize::Bumper
|
93
|
+
</h1>
|
94
|
+
|
95
|
+
<section class="description">
|
96
|
+
|
97
|
+
<p>Class that handles bumping an index.</p>
|
98
|
+
|
99
|
+
</section>
|
100
|
+
|
101
|
+
|
102
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
<section class="attribute-method-details" class="method-section">
|
111
|
+
<header>
|
112
|
+
<h3>Attributes</h3>
|
113
|
+
</header>
|
114
|
+
|
115
|
+
|
116
|
+
<div id="attribute-i-max_value" class="method-detail">
|
117
|
+
<div class="method-heading attribute-method-heading">
|
118
|
+
<span class="method-name">max_value</span><span
|
119
|
+
class="attribute-access-type">[R]</span>
|
120
|
+
</div>
|
121
|
+
|
122
|
+
<div class="method-description">
|
123
|
+
|
124
|
+
<p>The maximum before index wraps back to zero.</p>
|
125
|
+
|
126
|
+
<p>@return [Integer]</p>
|
127
|
+
|
128
|
+
</div>
|
129
|
+
</div>
|
130
|
+
|
131
|
+
<div id="attribute-i-value" class="method-detail">
|
132
|
+
<div class="method-heading attribute-method-heading">
|
133
|
+
<span class="method-name">value</span><span
|
134
|
+
class="attribute-access-type">[R]</span>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div class="method-description">
|
138
|
+
|
139
|
+
<p>The number after being bumped.</p>
|
140
|
+
|
141
|
+
<p>@return [Integer]</p>
|
142
|
+
|
143
|
+
</div>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
</section>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
151
|
+
<header>
|
152
|
+
<h3>Public Class Methods</h3>
|
153
|
+
</header>
|
154
|
+
|
155
|
+
|
156
|
+
<div id="method-c-new" class="method-detail ">
|
157
|
+
|
158
|
+
<div class="method-heading">
|
159
|
+
<span class="method-name">new</span><span
|
160
|
+
class="method-args">(initial_value, max_value, reverse = false)</span>
|
161
|
+
|
162
|
+
<span class="method-click-advice">click to toggle source</span>
|
163
|
+
|
164
|
+
</div>
|
165
|
+
|
166
|
+
|
167
|
+
<div class="method-description">
|
168
|
+
|
169
|
+
<p>Sets the bumper relative to the current index of words array. The value is automatically bumped once when instantiated. If on the last element of the words array, sets the bumper to 0.</p>
|
170
|
+
|
171
|
+
<p>@param [Integer] initial_value</p>
|
172
|
+
|
173
|
+
<p>@param [Integer] <a href="Bumper.html#attribute-i-max_value"><code>max_value</code></a></p>
|
174
|
+
|
175
|
+
<p>@param [Boolean] reverse Flip the order</p>
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
<div class="method-source-code" id="new-source">
|
181
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/bumper.rb, line 28</span>
|
182
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">initial_value</span>, <span class="ruby-identifier">max_value</span>, <span class="ruby-identifier">reverse</span> = <span class="ruby-keyword">false</span>)
|
183
|
+
<span class="ruby-ivar">@max_value</span> = <span class="ruby-identifier">max_value</span>
|
184
|
+
<span class="ruby-ivar">@reverse</span> = <span class="ruby-identifier">reverse</span>
|
185
|
+
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">bump_value</span>(<span class="ruby-identifier">initial_value</span>)
|
186
|
+
<span class="ruby-keyword">end</span></pre>
|
187
|
+
</div>
|
188
|
+
|
189
|
+
</div>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
</div>
|
195
|
+
|
196
|
+
|
197
|
+
</section>
|
198
|
+
|
199
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
200
|
+
<header>
|
201
|
+
<h3>Public Instance Methods</h3>
|
202
|
+
</header>
|
203
|
+
|
204
|
+
|
205
|
+
<div id="method-i-bump" class="method-detail ">
|
206
|
+
|
207
|
+
<div class="method-heading">
|
208
|
+
<span class="method-name">bump</span><span
|
209
|
+
class="method-args">()</span>
|
210
|
+
|
211
|
+
<span class="method-click-advice">click to toggle source</span>
|
212
|
+
|
213
|
+
</div>
|
214
|
+
|
215
|
+
|
216
|
+
<div class="method-description">
|
217
|
+
|
218
|
+
<p>Increments/Decrements the bumper. If on the last element of the words array, sets the bumper to 0. We don't need to worry about resetting the value to 0 when going in reverse, because when the array index is negative, it reads from the end of the array, which is already what we want.</p>
|
219
|
+
|
220
|
+
<p>@return [Integer]</p>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
<div class="method-source-code" id="bump-source">
|
226
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/bumper.rb, line 42</span>
|
227
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">bump</span>
|
228
|
+
<span class="ruby-ivar">@value</span> = <span class="ruby-identifier">bump_value</span>(<span class="ruby-identifier">value</span>)
|
229
|
+
<span class="ruby-keyword">end</span></pre>
|
230
|
+
</div>
|
231
|
+
|
232
|
+
</div>
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
</div>
|
238
|
+
|
239
|
+
|
240
|
+
<div id="method-i-reverse-3F" class="method-detail ">
|
241
|
+
|
242
|
+
<div class="method-heading">
|
243
|
+
<span class="method-name">reverse?</span><span
|
244
|
+
class="method-args">()</span>
|
245
|
+
|
246
|
+
<span class="method-click-advice">click to toggle source</span>
|
247
|
+
|
248
|
+
</div>
|
249
|
+
|
250
|
+
|
251
|
+
<div class="method-description">
|
252
|
+
|
253
|
+
<p>Should we decrement instead of increment?</p>
|
254
|
+
|
255
|
+
<p>@return [Boolean]</p>
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
<div class="method-source-code" id="reverse-3F-source">
|
261
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/bumper.rb, line 50</span>
|
262
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">reverse?</span>
|
263
|
+
<span class="ruby-ivar">@reverse</span>
|
264
|
+
<span class="ruby-keyword">end</span></pre>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
</div>
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
</div>
|
273
|
+
|
274
|
+
|
275
|
+
</section>
|
276
|
+
|
277
|
+
</section>
|
278
|
+
|
279
|
+
</main>
|
280
|
+
|
281
|
+
|
282
|
+
<footer id="validator-badges" role="contentinfo">
|
283
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
284
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
|
285
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
286
|
+
</footer>
|
287
|
+
|