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,544 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
|
3
|
+
<html>
|
4
|
+
<head>
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
|
7
|
+
<title>class Spoonerize::Cli - 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-execute">::execute</a>
|
79
|
+
|
80
|
+
<li ><a href="#method-c-new">::new</a>
|
81
|
+
|
82
|
+
<li ><a href="#method-i-longest_word_length">#longest_word_length</a>
|
83
|
+
|
84
|
+
<li ><a href="#method-i-map-3F">#map?</a>
|
85
|
+
|
86
|
+
<li ><a href="#method-i-print-3F">#print?</a>
|
87
|
+
|
88
|
+
<li ><a href="#method-i-print_log">#print_log</a>
|
89
|
+
|
90
|
+
<li ><a href="#method-i-print_mappings">#print_mappings</a>
|
91
|
+
|
92
|
+
<li ><a href="#method-i-save-3F">#save?</a>
|
93
|
+
|
94
|
+
<li ><a href="#method-i-spoonerism">#spoonerism</a>
|
95
|
+
|
96
|
+
</ul>
|
97
|
+
</div>
|
98
|
+
|
99
|
+
</div>
|
100
|
+
</nav>
|
101
|
+
|
102
|
+
<main role="main" aria-labelledby="class-Spoonerize::Cli">
|
103
|
+
<h1 id="class-Spoonerize::Cli" class="class">
|
104
|
+
class Spoonerize::Cli
|
105
|
+
</h1>
|
106
|
+
|
107
|
+
<section class="description">
|
108
|
+
|
109
|
+
<p>The class for handling the command-line interface.</p>
|
110
|
+
|
111
|
+
</section>
|
112
|
+
|
113
|
+
|
114
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
<section class="constants-list">
|
121
|
+
<header>
|
122
|
+
<h3>Constants</h3>
|
123
|
+
</header>
|
124
|
+
<dl>
|
125
|
+
|
126
|
+
<dt id="PREFERENCE_FILE">PREFERENCE_FILE
|
127
|
+
|
128
|
+
<dd><p>The preferences file the user can create to change runtime options.</p>
|
129
|
+
|
130
|
+
<p>@return [String]</p>
|
131
|
+
|
132
|
+
|
133
|
+
</dl>
|
134
|
+
</section>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
<section class="attribute-method-details" class="method-section">
|
139
|
+
<header>
|
140
|
+
<h3>Attributes</h3>
|
141
|
+
</header>
|
142
|
+
|
143
|
+
|
144
|
+
<div id="attribute-i-options" class="method-detail">
|
145
|
+
<div class="method-heading attribute-method-heading">
|
146
|
+
<span class="method-name">options</span><span
|
147
|
+
class="attribute-access-type">[R]</span>
|
148
|
+
</div>
|
149
|
+
|
150
|
+
<div class="method-description">
|
151
|
+
|
152
|
+
<p>Arguments passed at runtime.</p>
|
153
|
+
|
154
|
+
<p>@return [Array] ARGV</p>
|
155
|
+
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
<div id="attribute-i-preferences" class="method-detail">
|
160
|
+
<div class="method-heading attribute-method-heading">
|
161
|
+
<span class="method-name">preferences</span><span
|
162
|
+
class="attribute-access-type">[R]</span>
|
163
|
+
</div>
|
164
|
+
|
165
|
+
<div class="method-description">
|
166
|
+
|
167
|
+
<p>Preferences after reading config file and parsing ARGV.</p>
|
168
|
+
|
169
|
+
<p>@return [Array]</p>
|
170
|
+
|
171
|
+
</div>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
</section>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section">
|
179
|
+
<header>
|
180
|
+
<h3>Public Class Methods</h3>
|
181
|
+
</header>
|
182
|
+
|
183
|
+
|
184
|
+
<div id="method-c-execute" class="method-detail ">
|
185
|
+
|
186
|
+
<div class="method-heading">
|
187
|
+
<span class="method-name">execute</span><span
|
188
|
+
class="method-args">(options = [])</span>
|
189
|
+
|
190
|
+
<span class="method-click-advice">click to toggle source</span>
|
191
|
+
|
192
|
+
</div>
|
193
|
+
|
194
|
+
|
195
|
+
<div class="method-description">
|
196
|
+
|
197
|
+
<p>Creates an instance of <code>StandupMD</code> and runs what the user requested.</p>
|
198
|
+
|
199
|
+
<p>@param [Array] options</p>
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
<div class="method-source-code" id="execute-source">
|
205
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/cli.rb, line 20</span>
|
206
|
+
<span class="ruby-keyword">def</span> <span class="ruby-keyword">self</span>.<span class="ruby-identifier ruby-title">execute</span>(<span class="ruby-identifier">options</span> = [])
|
207
|
+
<span class="ruby-identifier">exe</span> = <span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>)
|
208
|
+
|
209
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print?</span>
|
210
|
+
<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print_log</span>
|
211
|
+
<span class="ruby-keyword">return</span>
|
212
|
+
<span class="ruby-keyword">end</span>
|
213
|
+
|
214
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">spoonerism</span>.<span class="ruby-identifier">to_s</span>
|
215
|
+
<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">print_mappings</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">map?</span>
|
216
|
+
|
217
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">exe</span>.<span class="ruby-identifier">save?</span>
|
218
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-string">"Saving..."</span>
|
219
|
+
<span class="ruby-identifier">exe</span>.<span class="ruby-identifier">spoonerism</span>.<span class="ruby-identifier">save</span>
|
220
|
+
<span class="ruby-keyword">end</span>
|
221
|
+
<span class="ruby-keyword">end</span></pre>
|
222
|
+
</div>
|
223
|
+
|
224
|
+
</div>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
</div>
|
230
|
+
|
231
|
+
|
232
|
+
<div id="method-c-new" class="method-detail ">
|
233
|
+
|
234
|
+
<div class="method-heading">
|
235
|
+
<span class="method-name">new</span><span
|
236
|
+
class="method-args">(options)</span>
|
237
|
+
|
238
|
+
<span class="method-click-advice">click to toggle source</span>
|
239
|
+
|
240
|
+
</div>
|
241
|
+
|
242
|
+
|
243
|
+
<div class="method-description">
|
244
|
+
|
245
|
+
<p>Create instance of <code>Cli</code></p>
|
246
|
+
|
247
|
+
<p>@param [Array] options</p>
|
248
|
+
|
249
|
+
<p>@return [self]</p>
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
<div class="method-source-code" id="new-source">
|
255
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/cli.rb, line 55</span>
|
256
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">initialize</span>(<span class="ruby-identifier">options</span>)
|
257
|
+
<span class="ruby-ivar">@map</span> = <span class="ruby-keyword">false</span>
|
258
|
+
<span class="ruby-ivar">@save</span> = <span class="ruby-keyword">false</span>
|
259
|
+
<span class="ruby-ivar">@print</span> = <span class="ruby-keyword">false</span>
|
260
|
+
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
|
261
|
+
<span class="ruby-ivar">@preferences</span> = <span class="ruby-identifier">get_preferences</span>
|
262
|
+
<span class="ruby-keyword">end</span></pre>
|
263
|
+
</div>
|
264
|
+
|
265
|
+
</div>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
</div>
|
271
|
+
|
272
|
+
|
273
|
+
</section>
|
274
|
+
|
275
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section">
|
276
|
+
<header>
|
277
|
+
<h3>Public Instance Methods</h3>
|
278
|
+
</header>
|
279
|
+
|
280
|
+
|
281
|
+
<div id="method-i-longest_word_length" class="method-detail ">
|
282
|
+
|
283
|
+
<div class="method-heading">
|
284
|
+
<span class="method-name">longest_word_length</span><span
|
285
|
+
class="method-args">()</span>
|
286
|
+
|
287
|
+
<span class="method-click-advice">click to toggle source</span>
|
288
|
+
|
289
|
+
</div>
|
290
|
+
|
291
|
+
|
292
|
+
<div class="method-description">
|
293
|
+
|
294
|
+
<p>The length of the longest word in the phrase.</p>
|
295
|
+
|
296
|
+
<p>@return [Integer]</p>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
<div class="method-source-code" id="longest_word_length-source">
|
302
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/cli.rb, line 102</span>
|
303
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">longest_word_length</span>
|
304
|
+
<span class="ruby-ivar">@longest_word_length</span> <span class="ruby-operator">||=</span>
|
305
|
+
<span class="ruby-identifier">spoonerism</span>.<span class="ruby-identifier">spoonerize</span>.<span class="ruby-identifier">group_by</span>(<span class="ruby-operator">&</span><span class="ruby-value">:size</span>).<span class="ruby-identifier">max</span>.<span class="ruby-identifier">first</span>.<span class="ruby-identifier">size</span>
|
306
|
+
<span class="ruby-keyword">end</span></pre>
|
307
|
+
</div>
|
308
|
+
|
309
|
+
</div>
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
</div>
|
315
|
+
|
316
|
+
|
317
|
+
<div id="method-i-map-3F" class="method-detail ">
|
318
|
+
|
319
|
+
<div class="method-heading">
|
320
|
+
<span class="method-name">map?</span><span
|
321
|
+
class="method-args">()</span>
|
322
|
+
|
323
|
+
<span class="method-click-advice">click to toggle source</span>
|
324
|
+
|
325
|
+
</div>
|
326
|
+
|
327
|
+
|
328
|
+
<div class="method-description">
|
329
|
+
|
330
|
+
<p>Should we print the mappings to the command line?</p>
|
331
|
+
|
332
|
+
<p>@return [Boolean]</p>
|
333
|
+
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
<div class="method-source-code" id="map-3F-source">
|
338
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/cli.rb, line 86</span>
|
339
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">map?</span>
|
340
|
+
<span class="ruby-ivar">@map</span>
|
341
|
+
<span class="ruby-keyword">end</span></pre>
|
342
|
+
</div>
|
343
|
+
|
344
|
+
</div>
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
</div>
|
350
|
+
|
351
|
+
|
352
|
+
<div id="method-i-print-3F" class="method-detail ">
|
353
|
+
|
354
|
+
<div class="method-heading">
|
355
|
+
<span class="method-name">print?</span><span
|
356
|
+
class="method-args">()</span>
|
357
|
+
|
358
|
+
<span class="method-click-advice">click to toggle source</span>
|
359
|
+
|
360
|
+
</div>
|
361
|
+
|
362
|
+
|
363
|
+
<div class="method-description">
|
364
|
+
|
365
|
+
<p>Should we print to the command line?</p>
|
366
|
+
|
367
|
+
<p>@return [Boolean]</p>
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
<div class="method-source-code" id="print-3F-source">
|
373
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/cli.rb, line 94</span>
|
374
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print?</span>
|
375
|
+
<span class="ruby-ivar">@print</span>
|
376
|
+
<span class="ruby-keyword">end</span></pre>
|
377
|
+
</div>
|
378
|
+
|
379
|
+
</div>
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
</div>
|
385
|
+
|
386
|
+
|
387
|
+
<div id="method-i-print_log" class="method-detail ">
|
388
|
+
|
389
|
+
<div class="method-heading">
|
390
|
+
<span class="method-name">print_log</span><span
|
391
|
+
class="method-args">()</span>
|
392
|
+
|
393
|
+
<span class="method-click-advice">click to toggle source</span>
|
394
|
+
|
395
|
+
</div>
|
396
|
+
|
397
|
+
|
398
|
+
<div class="method-description">
|
399
|
+
|
400
|
+
<p>Print the log file contents to the command line.</p>
|
401
|
+
|
402
|
+
<p>@return [nil]</p>
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
<div class="method-source-code" id="print_log-source">
|
408
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/cli.rb, line 111</span>
|
409
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_log</span>
|
410
|
+
<span class="ruby-identifier">s</span> = <span class="ruby-constant">Spoonerize</span><span class="ruby-operator">::</span><span class="ruby-constant">Log</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">spoonerism</span>.<span class="ruby-identifier">logfile_name</span>)
|
411
|
+
<span class="ruby-identifier">s</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">row</span><span class="ruby-operator">|</span> <span class="ruby-identifier">print</span> <span class="ruby-identifier">row</span>.<span class="ruby-identifier">join</span>(<span class="ruby-string">' | '</span>) <span class="ruby-operator">+</span> <span class="ruby-string">"\n"</span> }
|
412
|
+
<span class="ruby-keyword">end</span></pre>
|
413
|
+
</div>
|
414
|
+
|
415
|
+
</div>
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
</div>
|
421
|
+
|
422
|
+
|
423
|
+
<div id="method-i-print_mappings" class="method-detail ">
|
424
|
+
|
425
|
+
<div class="method-heading">
|
426
|
+
<span class="method-name">print_mappings</span><span
|
427
|
+
class="method-args">()</span>
|
428
|
+
|
429
|
+
<span class="method-click-advice">click to toggle source</span>
|
430
|
+
|
431
|
+
</div>
|
432
|
+
|
433
|
+
|
434
|
+
<div class="method-description">
|
435
|
+
|
436
|
+
<p>Print the hash of mappings to the command line.</p>
|
437
|
+
|
438
|
+
<p>@return [nil]</p>
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
|
443
|
+
<div class="method-source-code" id="print_mappings-source">
|
444
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/cli.rb, line 120</span>
|
445
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">print_mappings</span>
|
446
|
+
<span class="ruby-identifier">spoonerism</span>.<span class="ruby-identifier">to_h</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
|
447
|
+
<span class="ruby-identifier">puts</span> <span class="ruby-node">"%-#{longest_word_length}s => %s"</span> <span class="ruby-operator">%</span> [<span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span>]
|
448
|
+
<span class="ruby-keyword">end</span>
|
449
|
+
<span class="ruby-keyword">end</span></pre>
|
450
|
+
</div>
|
451
|
+
|
452
|
+
</div>
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
|
457
|
+
</div>
|
458
|
+
|
459
|
+
|
460
|
+
<div id="method-i-save-3F" class="method-detail ">
|
461
|
+
|
462
|
+
<div class="method-heading">
|
463
|
+
<span class="method-name">save?</span><span
|
464
|
+
class="method-args">()</span>
|
465
|
+
|
466
|
+
<span class="method-click-advice">click to toggle source</span>
|
467
|
+
|
468
|
+
</div>
|
469
|
+
|
470
|
+
|
471
|
+
<div class="method-description">
|
472
|
+
|
473
|
+
<p>Should we save to the log file?</p>
|
474
|
+
|
475
|
+
<p>@return [Boolean]</p>
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
<div class="method-source-code" id="save-3F-source">
|
481
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/cli.rb, line 78</span>
|
482
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">save?</span>
|
483
|
+
<span class="ruby-ivar">@save</span>
|
484
|
+
<span class="ruby-keyword">end</span></pre>
|
485
|
+
</div>
|
486
|
+
|
487
|
+
</div>
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
|
492
|
+
</div>
|
493
|
+
|
494
|
+
|
495
|
+
<div id="method-i-spoonerism" class="method-detail ">
|
496
|
+
|
497
|
+
<div class="method-heading">
|
498
|
+
<span class="method-name">spoonerism</span><span
|
499
|
+
class="method-args">()</span>
|
500
|
+
|
501
|
+
<span class="method-click-advice">click to toggle source</span>
|
502
|
+
|
503
|
+
</div>
|
504
|
+
|
505
|
+
|
506
|
+
<div class="method-description">
|
507
|
+
|
508
|
+
<p>Sets up an instance of <code>Spoonerize::Spoonerism</code> and passes all user preferences.</p>
|
509
|
+
|
510
|
+
<p>@return [Spoonerize::Spoonerism]</p>
|
511
|
+
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
<div class="method-source-code" id="spoonerism-source">
|
516
|
+
<pre><span class="ruby-comment"># File lib/spoonerize/cli.rb, line 68</span>
|
517
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier ruby-title">spoonerism</span>
|
518
|
+
<span class="ruby-ivar">@spoonerism</span> <span class="ruby-operator">||=</span> <span class="ruby-operator">::</span><span class="ruby-constant">Spoonerize</span><span class="ruby-operator">::</span><span class="ruby-constant">Spoonerism</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">options</span>) <span class="ruby-keyword">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">s</span><span class="ruby-operator">|</span>
|
519
|
+
<span class="ruby-identifier">preferences</span>.<span class="ruby-identifier">each</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span><span class="ruby-operator">|</span> <span class="ruby-identifier">s</span>.<span class="ruby-identifier">send</span>(<span class="ruby-node">"#{k}="</span>, <span class="ruby-identifier">v</span>) }
|
520
|
+
<span class="ruby-keyword">end</span>
|
521
|
+
<span class="ruby-keyword">end</span></pre>
|
522
|
+
</div>
|
523
|
+
|
524
|
+
</div>
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
|
529
|
+
</div>
|
530
|
+
|
531
|
+
|
532
|
+
</section>
|
533
|
+
|
534
|
+
</section>
|
535
|
+
|
536
|
+
</main>
|
537
|
+
|
538
|
+
|
539
|
+
<footer id="validator-badges" role="contentinfo">
|
540
|
+
<p><a href="https://validator.w3.org/check/referer">Validate</a>
|
541
|
+
<p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.2.1.
|
542
|
+
<p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
|
543
|
+
</footer>
|
544
|
+
|