cw 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardoc/checksums +33 -0
- data/.yardoc/object_types +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/.yardoc/proxy_types +0 -0
- data/cw.gemspec +1 -1
- data/doc/Alphabet.html +433 -0
- data/doc/AudioPlayer.html +805 -0
- data/doc/Book.html +3134 -0
- data/doc/BookDetails.html +664 -0
- data/doc/CW.html +849 -0
- data/doc/CWThreads.html +514 -0
- data/doc/Cl.html +1125 -0
- data/doc/CurrentWord.html +636 -0
- data/doc/CwDsl.html +1871 -0
- data/doc/CwEncoding.html +329 -0
- data/doc/FileDetails.html +236 -0
- data/doc/KeyInput.html +758 -0
- data/doc/MonitorKeys.html +482 -0
- data/doc/Numbers.html +433 -0
- data/doc/Params.html +352 -0
- data/doc/Print.html +1130 -0
- data/doc/Print/ProgressPrint.html +419 -0
- data/doc/Process.html +202 -0
- data/doc/Progress.html +337 -0
- data/doc/Randomize.html +959 -0
- data/doc/RepeatWord.html +816 -0
- data/doc/Rss.html +630 -0
- data/doc/Sentence.html +1457 -0
- data/doc/Spoken.html +215 -0
- data/doc/Str.html +771 -0
- data/doc/Stream.html +1401 -0
- data/doc/TestLetters.html +586 -0
- data/doc/TestWords.html +646 -0
- data/doc/Tester.html +3064 -0
- data/doc/Timing.html +1244 -0
- data/doc/ToneGenerator.html +2111 -0
- data/doc/Voice.html +273 -0
- data/doc/Words.html +1750 -0
- data/doc/_index.html +376 -0
- data/doc/class_list.html +58 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +339 -0
- data/doc/file.README.html +148 -0
- data/doc/file_list.html +60 -0
- data/doc/frames.html +26 -0
- data/doc/index.html +148 -0
- data/doc/js/app.js +219 -0
- data/doc/js/full_list.js +181 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +2697 -0
- data/doc/monitor.html +435 -0
- data/doc/top-level-namespace.html +114 -0
- metadata +53 -1
data/doc/CwDsl.html
ADDED
@@ -0,0 +1,1871 @@
|
|
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
|
+
Class: CwDsl
|
8
|
+
|
9
|
+
— Documentation by YARD 0.8.7.6
|
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#!CwDsl.html";
|
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 (C)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">CwDsl</span>
|
38
|
+
|
39
|
+
|
40
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
41
|
+
</div>
|
42
|
+
|
43
|
+
<div id="search">
|
44
|
+
|
45
|
+
<a class="full_list_link" id="class_list_link"
|
46
|
+
href="class_list.html">
|
47
|
+
Class List
|
48
|
+
</a>
|
49
|
+
|
50
|
+
<a class="full_list_link" id="method_list_link"
|
51
|
+
href="method_list.html">
|
52
|
+
Method List
|
53
|
+
</a>
|
54
|
+
|
55
|
+
<a class="full_list_link" id="file_list_link"
|
56
|
+
href="file_list.html">
|
57
|
+
File List
|
58
|
+
</a>
|
59
|
+
|
60
|
+
</div>
|
61
|
+
<div class="clear"></div>
|
62
|
+
</div>
|
63
|
+
|
64
|
+
<iframe id="search_frame"></iframe>
|
65
|
+
|
66
|
+
<div id="content"><h1>Class: CwDsl
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">Object</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">CwDsl</li>
|
82
|
+
|
83
|
+
</ul>
|
84
|
+
<a href="#" class="inheritanceTree">show all</a>
|
85
|
+
|
86
|
+
</dd>
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
<dt class="r2 last">Defined in:</dt>
|
97
|
+
<dd class="r2 last">lib/cw/cw_dsl.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>class Cw_dsl provides CW's commands</p>
|
106
|
+
|
107
|
+
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div><div id="subclasses">
|
114
|
+
<h2>Direct Known Subclasses</h2>
|
115
|
+
<p class="children"><span class='object_link'><a href="CW.html" title="CW (class)">CW</a></span></p>
|
116
|
+
</div>
|
117
|
+
|
118
|
+
<h2>Constant Summary</h2>
|
119
|
+
|
120
|
+
<dl class="constants">
|
121
|
+
|
122
|
+
<dt id="HERE-constant" class="">HERE =
|
123
|
+
|
124
|
+
</dt>
|
125
|
+
<dd><pre class="code"><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/</span><span class='tstring_end'>'</span></span></pre></dd>
|
126
|
+
|
127
|
+
<dt id="TEXT-constant" class="">TEXT =
|
128
|
+
|
129
|
+
</dt>
|
130
|
+
<dd><pre class="code"><span class='const'>HERE</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>../../data/text/</span><span class='tstring_end'>'</span></span></pre></dd>
|
131
|
+
|
132
|
+
<dt id="COMMON_WORDS-constant" class="">COMMON_WORDS =
|
133
|
+
|
134
|
+
</dt>
|
135
|
+
<dd><pre class="code"><span class='const'>TEXT</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>common_words.txt</span><span class='tstring_end'>'</span></span></pre></dd>
|
136
|
+
|
137
|
+
<dt id="MOST_COMMON_WORDS-constant" class="">MOST_COMMON_WORDS =
|
138
|
+
|
139
|
+
</dt>
|
140
|
+
<dd><pre class="code"><span class='const'>TEXT</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>most_common_words.txt</span><span class='tstring_end'>'</span></span></pre></dd>
|
141
|
+
|
142
|
+
<dt id="ABBREVIATIONS-constant" class="">ABBREVIATIONS =
|
143
|
+
|
144
|
+
</dt>
|
145
|
+
<dd><pre class="code"><span class='const'>TEXT</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>abbreviations.txt</span><span class='tstring_end'>'</span></span></pre></dd>
|
146
|
+
|
147
|
+
<dt id="Q_CODES-constant" class="">Q_CODES =
|
148
|
+
|
149
|
+
</dt>
|
150
|
+
<dd><pre class="code"><span class='const'>TEXT</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>q_codes.txt</span><span class='tstring_end'>'</span></span></pre></dd>
|
151
|
+
|
152
|
+
</dl>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
<h2>
|
163
|
+
Instance Method Summary
|
164
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
165
|
+
</h2>
|
166
|
+
|
167
|
+
<ul class="summary">
|
168
|
+
|
169
|
+
<li class="public ">
|
170
|
+
<span class="summary_signature">
|
171
|
+
|
172
|
+
<a href="#alphabet-instance_method" title="#alphabet (instance method)">- (Object) <strong>alphabet</strong>(options = {reverse: nil}) </a>
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
</span>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
187
|
+
|
188
|
+
</li>
|
189
|
+
|
190
|
+
|
191
|
+
<li class="public ">
|
192
|
+
<span class="summary_signature">
|
193
|
+
|
194
|
+
<a href="#beginning_with-instance_method" title="#beginning_with (instance method)">- (Object) <strong>beginning_with</strong>(*letters) </a>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
</span>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
209
|
+
|
210
|
+
</li>
|
211
|
+
|
212
|
+
|
213
|
+
<li class="public ">
|
214
|
+
<span class="summary_signature">
|
215
|
+
|
216
|
+
<a href="#config_defaults-instance_method" title="#config_defaults (instance method)">- (Object) <strong>config_defaults</strong> </a>
|
217
|
+
|
218
|
+
|
219
|
+
|
220
|
+
</span>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
231
|
+
|
232
|
+
</li>
|
233
|
+
|
234
|
+
|
235
|
+
<li class="public ">
|
236
|
+
<span class="summary_signature">
|
237
|
+
|
238
|
+
<a href="#config_files-instance_method" title="#config_files (instance method)">- (Object) <strong>config_files</strong> </a>
|
239
|
+
|
240
|
+
|
241
|
+
|
242
|
+
</span>
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
253
|
+
|
254
|
+
</li>
|
255
|
+
|
256
|
+
|
257
|
+
<li class="public ">
|
258
|
+
<span class="summary_signature">
|
259
|
+
|
260
|
+
<a href="#ending_with-instance_method" title="#ending_with (instance method)">- (Object) <strong>ending_with</strong>(*letters) </a>
|
261
|
+
|
262
|
+
|
263
|
+
|
264
|
+
</span>
|
265
|
+
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
275
|
+
|
276
|
+
</li>
|
277
|
+
|
278
|
+
|
279
|
+
<li class="public ">
|
280
|
+
<span class="summary_signature">
|
281
|
+
|
282
|
+
<a href="#including-instance_method" title="#including (instance method)">- (Object) <strong>including</strong>(*letters) </a>
|
283
|
+
|
284
|
+
|
285
|
+
|
286
|
+
</span>
|
287
|
+
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
297
|
+
|
298
|
+
</li>
|
299
|
+
|
300
|
+
|
301
|
+
<li class="public ">
|
302
|
+
<span class="summary_signature">
|
303
|
+
|
304
|
+
<a href="#init_config-instance_method" title="#init_config (instance method)">- (Object) <strong>init_config</strong> </a>
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
</span>
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
319
|
+
|
320
|
+
</li>
|
321
|
+
|
322
|
+
|
323
|
+
<li class="public ">
|
324
|
+
<span class="summary_signature">
|
325
|
+
|
326
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (CwDsl) <strong>initialize</strong> </a>
|
327
|
+
|
328
|
+
|
329
|
+
|
330
|
+
</span>
|
331
|
+
|
332
|
+
|
333
|
+
<span class="note title constructor">constructor</span>
|
334
|
+
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
<span class="summary_desc"><div class='inline'>
|
343
|
+
<p>A new instance of CwDsl.</p>
|
344
|
+
</div></span>
|
345
|
+
|
346
|
+
</li>
|
347
|
+
|
348
|
+
|
349
|
+
<li class="public ">
|
350
|
+
<span class="summary_signature">
|
351
|
+
|
352
|
+
<a href="#letters_numbers-instance_method" title="#letters_numbers (instance method)">- (Object) <strong>letters_numbers</strong> </a>
|
353
|
+
|
354
|
+
|
355
|
+
|
356
|
+
</span>
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
367
|
+
|
368
|
+
</li>
|
369
|
+
|
370
|
+
|
371
|
+
<li class="public ">
|
372
|
+
<span class="summary_signature">
|
373
|
+
|
374
|
+
<a href="#load_abbreviations-instance_method" title="#load_abbreviations (instance method)">- (Object) <strong>load_abbreviations</strong> </a>
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
</span>
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
389
|
+
|
390
|
+
</li>
|
391
|
+
|
392
|
+
|
393
|
+
<li class="public ">
|
394
|
+
<span class="summary_signature">
|
395
|
+
|
396
|
+
<a href="#load_alphabet-instance_method" title="#load_alphabet (instance method)">- (Object) <strong>load_alphabet</strong> </a>
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
</span>
|
401
|
+
|
402
|
+
|
403
|
+
|
404
|
+
|
405
|
+
|
406
|
+
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
<span class="summary_desc"><div class='inline'>
|
411
|
+
<p>todo refactor.</p>
|
412
|
+
</div></span>
|
413
|
+
|
414
|
+
</li>
|
415
|
+
|
416
|
+
|
417
|
+
<li class="public ">
|
418
|
+
<span class="summary_signature">
|
419
|
+
|
420
|
+
<a href="#load_common_words-instance_method" title="#load_common_words (instance method)">- (Object) <strong>load_common_words</strong> </a>
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
</span>
|
425
|
+
|
426
|
+
|
427
|
+
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
435
|
+
|
436
|
+
</li>
|
437
|
+
|
438
|
+
|
439
|
+
<li class="public ">
|
440
|
+
<span class="summary_signature">
|
441
|
+
|
442
|
+
<a href="#load_most_common_words-instance_method" title="#load_most_common_words (instance method)">- (Object) <strong>load_most_common_words</strong> </a>
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
</span>
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
|
455
|
+
|
456
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
457
|
+
|
458
|
+
</li>
|
459
|
+
|
460
|
+
|
461
|
+
<li class="public ">
|
462
|
+
<span class="summary_signature">
|
463
|
+
|
464
|
+
<a href="#load_numbers-instance_method" title="#load_numbers (instance method)">- (Object) <strong>load_numbers</strong> </a>
|
465
|
+
|
466
|
+
|
467
|
+
|
468
|
+
</span>
|
469
|
+
|
470
|
+
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
479
|
+
|
480
|
+
</li>
|
481
|
+
|
482
|
+
|
483
|
+
<li class="public ">
|
484
|
+
<span class="summary_signature">
|
485
|
+
|
486
|
+
<a href="#load_q_codes-instance_method" title="#load_q_codes (instance method)">- (Object) <strong>load_q_codes</strong> </a>
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
</span>
|
491
|
+
|
492
|
+
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
|
500
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
501
|
+
|
502
|
+
</li>
|
503
|
+
|
504
|
+
|
505
|
+
<li class="public ">
|
506
|
+
<span class="summary_signature">
|
507
|
+
|
508
|
+
<a href="#load_words-instance_method" title="#load_words (instance method)">- (Object) <strong>load_words</strong>(filename = COMMON_WORDS) </a>
|
509
|
+
|
510
|
+
|
511
|
+
|
512
|
+
</span>
|
513
|
+
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
|
518
|
+
|
519
|
+
|
520
|
+
|
521
|
+
|
522
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
523
|
+
|
524
|
+
</li>
|
525
|
+
|
526
|
+
|
527
|
+
<li class="public ">
|
528
|
+
<span class="summary_signature">
|
529
|
+
|
530
|
+
<a href="#no_longer_than-instance_method" title="#no_longer_than (instance method)">- (Object) <strong>no_longer_than</strong>(max) </a>
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
</span>
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
545
|
+
|
546
|
+
</li>
|
547
|
+
|
548
|
+
|
549
|
+
<li class="public ">
|
550
|
+
<span class="summary_signature">
|
551
|
+
|
552
|
+
<a href="#no_shorter_than-instance_method" title="#no_shorter_than (instance method)">- (Object) <strong>no_shorter_than</strong>(min) </a>
|
553
|
+
|
554
|
+
|
555
|
+
|
556
|
+
</span>
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
|
565
|
+
|
566
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
567
|
+
|
568
|
+
</li>
|
569
|
+
|
570
|
+
|
571
|
+
<li class="public ">
|
572
|
+
<span class="summary_signature">
|
573
|
+
|
574
|
+
<a href="#numbers-instance_method" title="#numbers (instance method)">- (Object) <strong>numbers</strong>(options = {reverse: nil}) </a>
|
575
|
+
|
576
|
+
|
577
|
+
|
578
|
+
</span>
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
|
585
|
+
|
586
|
+
|
587
|
+
|
588
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
589
|
+
|
590
|
+
</li>
|
591
|
+
|
592
|
+
|
593
|
+
<li class="public ">
|
594
|
+
<span class="summary_signature">
|
595
|
+
|
596
|
+
<a href="#numbers_spoken-instance_method" title="#numbers_spoken (instance method)">- (Object) <strong>numbers_spoken</strong> </a>
|
597
|
+
|
598
|
+
|
599
|
+
|
600
|
+
</span>
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
|
605
|
+
|
606
|
+
|
607
|
+
|
608
|
+
|
609
|
+
|
610
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
611
|
+
|
612
|
+
</li>
|
613
|
+
|
614
|
+
|
615
|
+
<li class="public ">
|
616
|
+
<span class="summary_signature">
|
617
|
+
|
618
|
+
<a href="#random_letters-instance_method" title="#random_letters (instance method)">- (Object) <strong>random_letters</strong>(options = {}) </a>
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
</span>
|
623
|
+
|
624
|
+
|
625
|
+
|
626
|
+
|
627
|
+
|
628
|
+
|
629
|
+
|
630
|
+
|
631
|
+
|
632
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
633
|
+
|
634
|
+
</li>
|
635
|
+
|
636
|
+
|
637
|
+
<li class="public ">
|
638
|
+
<span class="summary_signature">
|
639
|
+
|
640
|
+
<a href="#random_letters_numbers-instance_method" title="#random_letters_numbers (instance method)">- (Object) <strong>random_letters_numbers</strong>(options = {}) </a>
|
641
|
+
|
642
|
+
|
643
|
+
|
644
|
+
</span>
|
645
|
+
|
646
|
+
|
647
|
+
|
648
|
+
|
649
|
+
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
655
|
+
|
656
|
+
</li>
|
657
|
+
|
658
|
+
|
659
|
+
<li class="public ">
|
660
|
+
<span class="summary_signature">
|
661
|
+
|
662
|
+
<a href="#random_numbers-instance_method" title="#random_numbers (instance method)">- (Object) <strong>random_numbers</strong>(options = {}) </a>
|
663
|
+
|
664
|
+
|
665
|
+
|
666
|
+
</span>
|
667
|
+
|
668
|
+
|
669
|
+
|
670
|
+
|
671
|
+
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
|
676
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
677
|
+
|
678
|
+
</li>
|
679
|
+
|
680
|
+
|
681
|
+
<li class="public ">
|
682
|
+
<span class="summary_signature">
|
683
|
+
|
684
|
+
<a href="#reload-instance_method" title="#reload (instance method)">- (Object) <strong>reload</strong> </a>
|
685
|
+
|
686
|
+
|
687
|
+
|
688
|
+
</span>
|
689
|
+
|
690
|
+
|
691
|
+
|
692
|
+
|
693
|
+
|
694
|
+
|
695
|
+
|
696
|
+
|
697
|
+
|
698
|
+
<span class="summary_desc"><div class='inline'>
|
699
|
+
<p>def add_noise Params.noise = true end.</p>
|
700
|
+
</div></span>
|
701
|
+
|
702
|
+
</li>
|
703
|
+
|
704
|
+
|
705
|
+
<li class="public ">
|
706
|
+
<span class="summary_signature">
|
707
|
+
|
708
|
+
<a href="#reverse-instance_method" title="#reverse (instance method)">- (Object) <strong>reverse</strong> </a>
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
</span>
|
713
|
+
|
714
|
+
|
715
|
+
|
716
|
+
|
717
|
+
|
718
|
+
|
719
|
+
|
720
|
+
|
721
|
+
|
722
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
723
|
+
|
724
|
+
</li>
|
725
|
+
|
726
|
+
|
727
|
+
<li class="public ">
|
728
|
+
<span class="summary_signature">
|
729
|
+
|
730
|
+
<a href="#set_tone_type-instance_method" title="#set_tone_type (instance method)">- (Object) <strong>set_tone_type</strong>(type) </a>
|
731
|
+
|
732
|
+
|
733
|
+
|
734
|
+
</span>
|
735
|
+
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
|
743
|
+
|
744
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
745
|
+
|
746
|
+
</li>
|
747
|
+
|
748
|
+
|
749
|
+
<li class="public ">
|
750
|
+
<span class="summary_signature">
|
751
|
+
|
752
|
+
<a href="#word_count-instance_method" title="#word_count (instance method)">- (Object) <strong>word_count</strong>(wordcount) </a>
|
753
|
+
|
754
|
+
|
755
|
+
|
756
|
+
</span>
|
757
|
+
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
|
762
|
+
|
763
|
+
|
764
|
+
|
765
|
+
|
766
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
767
|
+
|
768
|
+
</li>
|
769
|
+
|
770
|
+
|
771
|
+
<li class="public ">
|
772
|
+
<span class="summary_signature">
|
773
|
+
|
774
|
+
<a href="#word_size-instance_method" title="#word_size (instance method)">- (Object) <strong>word_size</strong>(size = nil) </a>
|
775
|
+
|
776
|
+
|
777
|
+
|
778
|
+
</span>
|
779
|
+
|
780
|
+
|
781
|
+
|
782
|
+
|
783
|
+
|
784
|
+
|
785
|
+
|
786
|
+
|
787
|
+
|
788
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
789
|
+
|
790
|
+
</li>
|
791
|
+
|
792
|
+
|
793
|
+
<li class="public ">
|
794
|
+
<span class="summary_signature">
|
795
|
+
|
796
|
+
<a href="#words-instance_method" title="#words (instance method)">- (Object) <strong>words</strong> </a>
|
797
|
+
|
798
|
+
|
799
|
+
|
800
|
+
</span>
|
801
|
+
|
802
|
+
|
803
|
+
|
804
|
+
|
805
|
+
|
806
|
+
|
807
|
+
|
808
|
+
|
809
|
+
|
810
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
811
|
+
|
812
|
+
</li>
|
813
|
+
|
814
|
+
|
815
|
+
<li class="public ">
|
816
|
+
<span class="summary_signature">
|
817
|
+
|
818
|
+
<a href="#words%3D-instance_method" title="#words= (instance method)">- (Object) <strong>words=</strong>(words) </a>
|
819
|
+
|
820
|
+
|
821
|
+
|
822
|
+
</span>
|
823
|
+
|
824
|
+
|
825
|
+
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
|
832
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
833
|
+
|
834
|
+
</li>
|
835
|
+
|
836
|
+
|
837
|
+
</ul>
|
838
|
+
|
839
|
+
|
840
|
+
<div id="constructor_details" class="method_details_list">
|
841
|
+
<h2>Constructor Details</h2>
|
842
|
+
|
843
|
+
<div class="method_details first">
|
844
|
+
<h3 class="signature first" id="initialize-instance_method">
|
845
|
+
|
846
|
+
- (<tt><span class='object_link'><a href="" title="CwDsl (class)">CwDsl</a></span></tt>) <strong>initialize</strong>
|
847
|
+
|
848
|
+
|
849
|
+
|
850
|
+
|
851
|
+
|
852
|
+
</h3><div class="docstring">
|
853
|
+
<div class="discussion">
|
854
|
+
|
855
|
+
<p>Returns a new instance of CwDsl</p>
|
856
|
+
|
857
|
+
|
858
|
+
</div>
|
859
|
+
</div>
|
860
|
+
<div class="tags">
|
861
|
+
|
862
|
+
|
863
|
+
</div><table class="source_code">
|
864
|
+
<tr>
|
865
|
+
<td>
|
866
|
+
<pre class="lines">
|
867
|
+
|
868
|
+
|
869
|
+
14
|
870
|
+
15
|
871
|
+
16
|
872
|
+
17
|
873
|
+
18</pre>
|
874
|
+
</td>
|
875
|
+
<td>
|
876
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 14</span>
|
877
|
+
|
878
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
879
|
+
<span class='ivar'>@words</span><span class='comma'>,</span> <span class='ivar'>@cl</span><span class='comma'>,</span> <span class='ivar'>@str</span> <span class='op'>=</span>
|
880
|
+
<span class='const'>Words</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='const'>Cl</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='comma'>,</span> <span class='const'>Str</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
881
|
+
<span class='id identifier rubyid_init_config'>init_config</span>
|
882
|
+
<span class='kw'>end</span></pre>
|
883
|
+
</td>
|
884
|
+
</tr>
|
885
|
+
</table>
|
886
|
+
</div>
|
887
|
+
|
888
|
+
</div>
|
889
|
+
|
890
|
+
|
891
|
+
<div id="instance_method_details" class="method_details_list">
|
892
|
+
<h2>Instance Method Details</h2>
|
893
|
+
|
894
|
+
|
895
|
+
<div class="method_details first">
|
896
|
+
<h3 class="signature first" id="alphabet-instance_method">
|
897
|
+
|
898
|
+
- (<tt>Object</tt>) <strong>alphabet</strong>(options = {reverse: nil})
|
899
|
+
|
900
|
+
|
901
|
+
|
902
|
+
|
903
|
+
|
904
|
+
</h3><table class="source_code">
|
905
|
+
<tr>
|
906
|
+
<td>
|
907
|
+
<pre class="lines">
|
908
|
+
|
909
|
+
|
910
|
+
154
|
911
|
+
155
|
912
|
+
156</pre>
|
913
|
+
</td>
|
914
|
+
<td>
|
915
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 154</span>
|
916
|
+
|
917
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_alphabet'>alphabet</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>reverse:</span> <span class='kw'>nil</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
918
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_alphabet'>alphabet</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
919
|
+
<span class='kw'>end</span></pre>
|
920
|
+
</td>
|
921
|
+
</tr>
|
922
|
+
</table>
|
923
|
+
</div>
|
924
|
+
|
925
|
+
<div class="method_details ">
|
926
|
+
<h3 class="signature " id="beginning_with-instance_method">
|
927
|
+
|
928
|
+
- (<tt>Object</tt>) <strong>beginning_with</strong>(*letters)
|
929
|
+
|
930
|
+
|
931
|
+
|
932
|
+
|
933
|
+
|
934
|
+
</h3><table class="source_code">
|
935
|
+
<tr>
|
936
|
+
<td>
|
937
|
+
<pre class="lines">
|
938
|
+
|
939
|
+
|
940
|
+
103
|
941
|
+
104
|
942
|
+
105
|
943
|
+
106</pre>
|
944
|
+
</td>
|
945
|
+
<td>
|
946
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 103</span>
|
947
|
+
|
948
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_beginning_with'>beginning_with</span><span class='lparen'>(</span><span class='op'>*</span> <span class='id identifier rubyid_letters'>letters</span><span class='rparen'>)</span>
|
949
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_beginning_with'>beginning_with</span> <span class='id identifier rubyid_letters'>letters</span>
|
950
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_begin'>begin</span> <span class='op'>=</span> <span class='id identifier rubyid_letters'>letters</span>
|
951
|
+
<span class='kw'>end</span></pre>
|
952
|
+
</td>
|
953
|
+
</tr>
|
954
|
+
</table>
|
955
|
+
</div>
|
956
|
+
|
957
|
+
<div class="method_details ">
|
958
|
+
<h3 class="signature " id="config_defaults-instance_method">
|
959
|
+
|
960
|
+
- (<tt>Object</tt>) <strong>config_defaults</strong>
|
961
|
+
|
962
|
+
|
963
|
+
|
964
|
+
|
965
|
+
|
966
|
+
</h3><table class="source_code">
|
967
|
+
<tr>
|
968
|
+
<td>
|
969
|
+
<pre class="lines">
|
970
|
+
|
971
|
+
|
972
|
+
69
|
973
|
+
70
|
974
|
+
71
|
975
|
+
72
|
976
|
+
73
|
977
|
+
74
|
978
|
+
75
|
979
|
+
76
|
980
|
+
77</pre>
|
981
|
+
</td>
|
982
|
+
<td>
|
983
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 69</span>
|
984
|
+
|
985
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_config_defaults'>config_defaults</span>
|
986
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span> <span class='lbrace'>{</span>
|
987
|
+
<span class='id identifier rubyid_name'>name</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>unnamed</span><span class='tstring_end'>'</span></span>
|
988
|
+
<span class='id identifier rubyid_wpm'>wpm</span> <span class='int'>25</span>
|
989
|
+
<span class='id identifier rubyid_frequency'>frequency</span> <span class='int'>500</span>
|
990
|
+
<span class='id identifier rubyid_dictionary'>dictionary</span> <span class='const'>COMMON_WORDS</span>
|
991
|
+
<span class='comment'># def_word_count 100
|
992
|
+
</span> <span class='rbrace'>}</span>
|
993
|
+
<span class='kw'>end</span></pre>
|
994
|
+
</td>
|
995
|
+
</tr>
|
996
|
+
</table>
|
997
|
+
</div>
|
998
|
+
|
999
|
+
<div class="method_details ">
|
1000
|
+
<h3 class="signature " id="config_files-instance_method">
|
1001
|
+
|
1002
|
+
- (<tt>Object</tt>) <strong>config_files</strong>
|
1003
|
+
|
1004
|
+
|
1005
|
+
|
1006
|
+
|
1007
|
+
|
1008
|
+
</h3><table class="source_code">
|
1009
|
+
<tr>
|
1010
|
+
<td>
|
1011
|
+
<pre class="lines">
|
1012
|
+
|
1013
|
+
|
1014
|
+
79
|
1015
|
+
80
|
1016
|
+
81
|
1017
|
+
82
|
1018
|
+
83
|
1019
|
+
84
|
1020
|
+
85</pre>
|
1021
|
+
</td>
|
1022
|
+
<td>
|
1023
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 79</span>
|
1024
|
+
|
1025
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_config_files'>config_files</span>
|
1026
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span> <span class='lbrace'>{</span>
|
1027
|
+
<span class='id identifier rubyid_audio_dir'>audio_dir</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>audio</span><span class='tstring_end'>'</span></span>
|
1028
|
+
<span class='id identifier rubyid_audio_filename'>audio_filename</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>audio_output.wav</span><span class='tstring_end'>'</span></span>
|
1029
|
+
<span class='id identifier rubyid_word_filename'>word_filename</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>words.txt</span><span class='tstring_end'>'</span></span>
|
1030
|
+
<span class='rbrace'>}</span>
|
1031
|
+
<span class='kw'>end</span></pre>
|
1032
|
+
</td>
|
1033
|
+
</tr>
|
1034
|
+
</table>
|
1035
|
+
</div>
|
1036
|
+
|
1037
|
+
<div class="method_details ">
|
1038
|
+
<h3 class="signature " id="ending_with-instance_method">
|
1039
|
+
|
1040
|
+
- (<tt>Object</tt>) <strong>ending_with</strong>(*letters)
|
1041
|
+
|
1042
|
+
|
1043
|
+
|
1044
|
+
|
1045
|
+
|
1046
|
+
</h3><table class="source_code">
|
1047
|
+
<tr>
|
1048
|
+
<td>
|
1049
|
+
<pre class="lines">
|
1050
|
+
|
1051
|
+
|
1052
|
+
108
|
1053
|
+
109
|
1054
|
+
110
|
1055
|
+
111</pre>
|
1056
|
+
</td>
|
1057
|
+
<td>
|
1058
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 108</span>
|
1059
|
+
|
1060
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ending_with'>ending_with</span><span class='lparen'>(</span><span class='op'>*</span> <span class='id identifier rubyid_letters'>letters</span><span class='rparen'>)</span>
|
1061
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_ending_with'>ending_with</span> <span class='id identifier rubyid_letters'>letters</span>
|
1062
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_end'>end</span> <span class='op'>=</span> <span class='id identifier rubyid_letters'>letters</span>
|
1063
|
+
<span class='kw'>end</span></pre>
|
1064
|
+
</td>
|
1065
|
+
</tr>
|
1066
|
+
</table>
|
1067
|
+
</div>
|
1068
|
+
|
1069
|
+
<div class="method_details ">
|
1070
|
+
<h3 class="signature " id="including-instance_method">
|
1071
|
+
|
1072
|
+
- (<tt>Object</tt>) <strong>including</strong>(*letters)
|
1073
|
+
|
1074
|
+
|
1075
|
+
|
1076
|
+
|
1077
|
+
|
1078
|
+
</h3><table class="source_code">
|
1079
|
+
<tr>
|
1080
|
+
<td>
|
1081
|
+
<pre class="lines">
|
1082
|
+
|
1083
|
+
|
1084
|
+
118
|
1085
|
+
119
|
1086
|
+
120
|
1087
|
+
121</pre>
|
1088
|
+
</td>
|
1089
|
+
<td>
|
1090
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 118</span>
|
1091
|
+
|
1092
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_including'>including</span><span class='lparen'>(</span><span class='op'>*</span> <span class='id identifier rubyid_letters'>letters</span><span class='rparen'>)</span>
|
1093
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_including'>including</span> <span class='op'>=</span> <span class='id identifier rubyid_letters'>letters</span>
|
1094
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_including'>including</span> <span class='id identifier rubyid_letters'>letters</span>
|
1095
|
+
<span class='kw'>end</span></pre>
|
1096
|
+
</td>
|
1097
|
+
</tr>
|
1098
|
+
</table>
|
1099
|
+
</div>
|
1100
|
+
|
1101
|
+
<div class="method_details ">
|
1102
|
+
<h3 class="signature " id="init_config-instance_method">
|
1103
|
+
|
1104
|
+
- (<tt>Object</tt>) <strong>init_config</strong>
|
1105
|
+
|
1106
|
+
|
1107
|
+
|
1108
|
+
|
1109
|
+
|
1110
|
+
</h3><table class="source_code">
|
1111
|
+
<tr>
|
1112
|
+
<td>
|
1113
|
+
<pre class="lines">
|
1114
|
+
|
1115
|
+
|
1116
|
+
54
|
1117
|
+
55
|
1118
|
+
56
|
1119
|
+
57
|
1120
|
+
58
|
1121
|
+
59
|
1122
|
+
60
|
1123
|
+
61
|
1124
|
+
62
|
1125
|
+
63
|
1126
|
+
64
|
1127
|
+
65
|
1128
|
+
66
|
1129
|
+
67</pre>
|
1130
|
+
</td>
|
1131
|
+
<td>
|
1132
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 54</span>
|
1133
|
+
|
1134
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_init_config'>init_config</span>
|
1135
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span> <span class='kw'>do</span>
|
1136
|
+
<span class='id identifier rubyid_param'>param</span> <span class='symbol'>:name</span><span class='comma'>,</span> <span class='symbol'>:wpm</span><span class='comma'>,</span>
|
1137
|
+
<span class='symbol'>:dictionary</span><span class='comma'>,</span> <span class='symbol'>:command_line</span><span class='comma'>,</span> <span class='symbol'>:audio_filename</span><span class='comma'>,</span> <span class='symbol'>:tone</span><span class='comma'>,</span> <span class='symbol'>:pause</span><span class='comma'>,</span>
|
1138
|
+
<span class='symbol'>:print_letters</span><span class='comma'>,</span> <span class='symbol'>:double_words</span><span class='comma'>,</span>
|
1139
|
+
<span class='symbol'>:word_filename</span><span class='comma'>,</span> <span class='symbol'>:author</span><span class='comma'>,</span> <span class='symbol'>:title</span><span class='comma'>,</span> <span class='symbol'>:quality</span><span class='comma'>,</span> <span class='symbol'>:frequency</span><span class='comma'>,</span> <span class='symbol'>:shuffle</span><span class='comma'>,</span> <span class='symbol'>:effective_wpm</span><span class='comma'>,</span>
|
1140
|
+
<span class='symbol'>:max</span><span class='comma'>,</span> <span class='symbol'>:min</span><span class='comma'>,</span> <span class='symbol'>:word_spacing</span><span class='comma'>,</span> <span class='symbol'>:noise</span><span class='comma'>,</span> <span class='symbol'>:begin</span><span class='comma'>,</span> <span class='symbol'>:end</span><span class='comma'>,</span> <span class='symbol'>:word_count</span><span class='comma'>,</span> <span class='symbol'>:including</span><span class='comma'>,</span>
|
1141
|
+
<span class='symbol'>:word_size</span><span class='comma'>,</span> <span class='symbol'>:size</span><span class='comma'>,</span> <span class='symbol'>:beginning_with</span><span class='comma'>,</span> <span class='symbol'>:ending_with</span><span class='comma'>,</span> <span class='symbol'>:mark_words</span><span class='comma'>,</span> <span class='symbol'>:audio_dir</span><span class='comma'>,</span>
|
1142
|
+
<span class='symbol'>:use_ebook2cw</span><span class='comma'>,</span> <span class='symbol'>:def_word_count</span>
|
1143
|
+
<span class='kw'>end</span>
|
1144
|
+
|
1145
|
+
<span class='id identifier rubyid_config_defaults'>config_defaults</span>
|
1146
|
+
<span class='id identifier rubyid_config_files'>config_files</span>
|
1147
|
+
<span class='kw'>end</span></pre>
|
1148
|
+
</td>
|
1149
|
+
</tr>
|
1150
|
+
</table>
|
1151
|
+
</div>
|
1152
|
+
|
1153
|
+
<div class="method_details ">
|
1154
|
+
<h3 class="signature " id="letters_numbers-instance_method">
|
1155
|
+
|
1156
|
+
- (<tt>Object</tt>) <strong>letters_numbers</strong>
|
1157
|
+
|
1158
|
+
|
1159
|
+
|
1160
|
+
|
1161
|
+
|
1162
|
+
</h3><table class="source_code">
|
1163
|
+
<tr>
|
1164
|
+
<td>
|
1165
|
+
<pre class="lines">
|
1166
|
+
|
1167
|
+
|
1168
|
+
137
|
1169
|
+
138
|
1170
|
+
139</pre>
|
1171
|
+
</td>
|
1172
|
+
<td>
|
1173
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 137</span>
|
1174
|
+
|
1175
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_letters_numbers'>letters_numbers</span>
|
1176
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_letters_numbers'>letters_numbers</span>
|
1177
|
+
<span class='kw'>end</span></pre>
|
1178
|
+
</td>
|
1179
|
+
</tr>
|
1180
|
+
</table>
|
1181
|
+
</div>
|
1182
|
+
|
1183
|
+
<div class="method_details ">
|
1184
|
+
<h3 class="signature " id="load_abbreviations-instance_method">
|
1185
|
+
|
1186
|
+
- (<tt>Object</tt>) <strong>load_abbreviations</strong>
|
1187
|
+
|
1188
|
+
|
1189
|
+
|
1190
|
+
|
1191
|
+
|
1192
|
+
</h3><table class="source_code">
|
1193
|
+
<tr>
|
1194
|
+
<td>
|
1195
|
+
<pre class="lines">
|
1196
|
+
|
1197
|
+
|
1198
|
+
181
|
1199
|
+
182
|
1200
|
+
183</pre>
|
1201
|
+
</td>
|
1202
|
+
<td>
|
1203
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 181</span>
|
1204
|
+
|
1205
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_abbreviations'>load_abbreviations</span>
|
1206
|
+
<span class='id identifier rubyid_load_words'>load_words</span> <span class='const'>ABBREVIATIONS</span>
|
1207
|
+
<span class='kw'>end</span></pre>
|
1208
|
+
</td>
|
1209
|
+
</tr>
|
1210
|
+
</table>
|
1211
|
+
</div>
|
1212
|
+
|
1213
|
+
<div class="method_details ">
|
1214
|
+
<h3 class="signature " id="load_alphabet-instance_method">
|
1215
|
+
|
1216
|
+
- (<tt>Object</tt>) <strong>load_alphabet</strong>
|
1217
|
+
|
1218
|
+
|
1219
|
+
|
1220
|
+
|
1221
|
+
|
1222
|
+
</h3><div class="docstring">
|
1223
|
+
<div class="discussion">
|
1224
|
+
|
1225
|
+
<p>todo refactor</p>
|
1226
|
+
|
1227
|
+
|
1228
|
+
</div>
|
1229
|
+
</div>
|
1230
|
+
<div class="tags">
|
1231
|
+
|
1232
|
+
|
1233
|
+
</div><table class="source_code">
|
1234
|
+
<tr>
|
1235
|
+
<td>
|
1236
|
+
<pre class="lines">
|
1237
|
+
|
1238
|
+
|
1239
|
+
191
|
1240
|
+
192
|
1241
|
+
193</pre>
|
1242
|
+
</td>
|
1243
|
+
<td>
|
1244
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 191</span>
|
1245
|
+
|
1246
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_alphabet'>load_alphabet</span>
|
1247
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_assign'>assign</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>a b c d e f g h i j k l m n o p q r s t u v w x y z </span><span class='tstring_end'>'</span></span>
|
1248
|
+
<span class='kw'>end</span></pre>
|
1249
|
+
</td>
|
1250
|
+
</tr>
|
1251
|
+
</table>
|
1252
|
+
</div>
|
1253
|
+
|
1254
|
+
<div class="method_details ">
|
1255
|
+
<h3 class="signature " id="load_common_words-instance_method">
|
1256
|
+
|
1257
|
+
- (<tt>Object</tt>) <strong>load_common_words</strong>
|
1258
|
+
|
1259
|
+
|
1260
|
+
|
1261
|
+
|
1262
|
+
|
1263
|
+
</h3><table class="source_code">
|
1264
|
+
<tr>
|
1265
|
+
<td>
|
1266
|
+
<pre class="lines">
|
1267
|
+
|
1268
|
+
|
1269
|
+
173
|
1270
|
+
174
|
1271
|
+
175</pre>
|
1272
|
+
</td>
|
1273
|
+
<td>
|
1274
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 173</span>
|
1275
|
+
|
1276
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_common_words'>load_common_words</span>
|
1277
|
+
<span class='id identifier rubyid_load_words'>load_words</span>
|
1278
|
+
<span class='kw'>end</span></pre>
|
1279
|
+
</td>
|
1280
|
+
</tr>
|
1281
|
+
</table>
|
1282
|
+
</div>
|
1283
|
+
|
1284
|
+
<div class="method_details ">
|
1285
|
+
<h3 class="signature " id="load_most_common_words-instance_method">
|
1286
|
+
|
1287
|
+
- (<tt>Object</tt>) <strong>load_most_common_words</strong>
|
1288
|
+
|
1289
|
+
|
1290
|
+
|
1291
|
+
|
1292
|
+
|
1293
|
+
</h3><table class="source_code">
|
1294
|
+
<tr>
|
1295
|
+
<td>
|
1296
|
+
<pre class="lines">
|
1297
|
+
|
1298
|
+
|
1299
|
+
177
|
1300
|
+
178
|
1301
|
+
179</pre>
|
1302
|
+
</td>
|
1303
|
+
<td>
|
1304
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 177</span>
|
1305
|
+
|
1306
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_most_common_words'>load_most_common_words</span>
|
1307
|
+
<span class='id identifier rubyid_load_words'>load_words</span> <span class='const'>MOST_COMMON_WORDS</span>
|
1308
|
+
<span class='kw'>end</span></pre>
|
1309
|
+
</td>
|
1310
|
+
</tr>
|
1311
|
+
</table>
|
1312
|
+
</div>
|
1313
|
+
|
1314
|
+
<div class="method_details ">
|
1315
|
+
<h3 class="signature " id="load_numbers-instance_method">
|
1316
|
+
|
1317
|
+
- (<tt>Object</tt>) <strong>load_numbers</strong>
|
1318
|
+
|
1319
|
+
|
1320
|
+
|
1321
|
+
|
1322
|
+
|
1323
|
+
</h3><table class="source_code">
|
1324
|
+
<tr>
|
1325
|
+
<td>
|
1326
|
+
<pre class="lines">
|
1327
|
+
|
1328
|
+
|
1329
|
+
195
|
1330
|
+
196
|
1331
|
+
197</pre>
|
1332
|
+
</td>
|
1333
|
+
<td>
|
1334
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 195</span>
|
1335
|
+
|
1336
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_numbers'>load_numbers</span>
|
1337
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_assign'>assign</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>1 2 3 4 5 6 7 8 9 0 </span><span class='tstring_end'>'</span></span>
|
1338
|
+
<span class='kw'>end</span></pre>
|
1339
|
+
</td>
|
1340
|
+
</tr>
|
1341
|
+
</table>
|
1342
|
+
</div>
|
1343
|
+
|
1344
|
+
<div class="method_details ">
|
1345
|
+
<h3 class="signature " id="load_q_codes-instance_method">
|
1346
|
+
|
1347
|
+
- (<tt>Object</tt>) <strong>load_q_codes</strong>
|
1348
|
+
|
1349
|
+
|
1350
|
+
|
1351
|
+
|
1352
|
+
|
1353
|
+
</h3><table class="source_code">
|
1354
|
+
<tr>
|
1355
|
+
<td>
|
1356
|
+
<pre class="lines">
|
1357
|
+
|
1358
|
+
|
1359
|
+
185
|
1360
|
+
186
|
1361
|
+
187</pre>
|
1362
|
+
</td>
|
1363
|
+
<td>
|
1364
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 185</span>
|
1365
|
+
|
1366
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_q_codes'>load_q_codes</span>
|
1367
|
+
<span class='id identifier rubyid_load_words'>load_words</span> <span class='const'>Q_CODES</span>
|
1368
|
+
<span class='kw'>end</span></pre>
|
1369
|
+
</td>
|
1370
|
+
</tr>
|
1371
|
+
</table>
|
1372
|
+
</div>
|
1373
|
+
|
1374
|
+
<div class="method_details ">
|
1375
|
+
<h3 class="signature " id="load_words-instance_method">
|
1376
|
+
|
1377
|
+
- (<tt>Object</tt>) <strong>load_words</strong>(filename = COMMON_WORDS)
|
1378
|
+
|
1379
|
+
|
1380
|
+
|
1381
|
+
|
1382
|
+
|
1383
|
+
</h3><table class="source_code">
|
1384
|
+
<tr>
|
1385
|
+
<td>
|
1386
|
+
<pre class="lines">
|
1387
|
+
|
1388
|
+
|
1389
|
+
199
|
1390
|
+
200
|
1391
|
+
201
|
1392
|
+
202</pre>
|
1393
|
+
</td>
|
1394
|
+
<td>
|
1395
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 199</span>
|
1396
|
+
|
1397
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_load_words'>load_words</span><span class='lparen'>(</span><span class='id identifier rubyid_filename'>filename</span> <span class='op'>=</span> <span class='const'>COMMON_WORDS</span><span class='rparen'>)</span>
|
1398
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_dictionary'>dictionary</span> <span class='op'>=</span> <span class='id identifier rubyid_filename'>filename</span>
|
1399
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_load'>load</span> <span class='id identifier rubyid_filename'>filename</span>
|
1400
|
+
<span class='kw'>end</span></pre>
|
1401
|
+
</td>
|
1402
|
+
</tr>
|
1403
|
+
</table>
|
1404
|
+
</div>
|
1405
|
+
|
1406
|
+
<div class="method_details ">
|
1407
|
+
<h3 class="signature " id="no_longer_than-instance_method">
|
1408
|
+
|
1409
|
+
- (<tt>Object</tt>) <strong>no_longer_than</strong>(max)
|
1410
|
+
|
1411
|
+
|
1412
|
+
|
1413
|
+
|
1414
|
+
|
1415
|
+
</h3><table class="source_code">
|
1416
|
+
<tr>
|
1417
|
+
<td>
|
1418
|
+
<pre class="lines">
|
1419
|
+
|
1420
|
+
|
1421
|
+
123
|
1422
|
+
124
|
1423
|
+
125
|
1424
|
+
126</pre>
|
1425
|
+
</td>
|
1426
|
+
<td>
|
1427
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 123</span>
|
1428
|
+
|
1429
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_no_longer_than'>no_longer_than</span><span class='lparen'>(</span><span class='id identifier rubyid_max'>max</span><span class='rparen'>)</span>
|
1430
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span> <span class='op'>=</span> <span class='id identifier rubyid_max'>max</span>
|
1431
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_no_longer_than'>no_longer_than</span> <span class='id identifier rubyid_max'>max</span>
|
1432
|
+
<span class='kw'>end</span></pre>
|
1433
|
+
</td>
|
1434
|
+
</tr>
|
1435
|
+
</table>
|
1436
|
+
</div>
|
1437
|
+
|
1438
|
+
<div class="method_details ">
|
1439
|
+
<h3 class="signature " id="no_shorter_than-instance_method">
|
1440
|
+
|
1441
|
+
- (<tt>Object</tt>) <strong>no_shorter_than</strong>(min)
|
1442
|
+
|
1443
|
+
|
1444
|
+
|
1445
|
+
|
1446
|
+
|
1447
|
+
</h3><table class="source_code">
|
1448
|
+
<tr>
|
1449
|
+
<td>
|
1450
|
+
<pre class="lines">
|
1451
|
+
|
1452
|
+
|
1453
|
+
128
|
1454
|
+
129
|
1455
|
+
130
|
1456
|
+
131</pre>
|
1457
|
+
</td>
|
1458
|
+
<td>
|
1459
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 128</span>
|
1460
|
+
|
1461
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_no_shorter_than'>no_shorter_than</span><span class='lparen'>(</span><span class='id identifier rubyid_min'>min</span><span class='rparen'>)</span>
|
1462
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span> <span class='op'>=</span> <span class='id identifier rubyid_min'>min</span>
|
1463
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_no_shorter_than'>no_shorter_than</span> <span class='id identifier rubyid_min'>min</span>
|
1464
|
+
<span class='kw'>end</span></pre>
|
1465
|
+
</td>
|
1466
|
+
</tr>
|
1467
|
+
</table>
|
1468
|
+
</div>
|
1469
|
+
|
1470
|
+
<div class="method_details ">
|
1471
|
+
<h3 class="signature " id="numbers-instance_method">
|
1472
|
+
|
1473
|
+
- (<tt>Object</tt>) <strong>numbers</strong>(options = {reverse: nil})
|
1474
|
+
|
1475
|
+
|
1476
|
+
|
1477
|
+
|
1478
|
+
|
1479
|
+
</h3><table class="source_code">
|
1480
|
+
<tr>
|
1481
|
+
<td>
|
1482
|
+
<pre class="lines">
|
1483
|
+
|
1484
|
+
|
1485
|
+
158
|
1486
|
+
159
|
1487
|
+
160</pre>
|
1488
|
+
</td>
|
1489
|
+
<td>
|
1490
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 158</span>
|
1491
|
+
|
1492
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_numbers'>numbers</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='label'>reverse:</span> <span class='kw'>nil</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1493
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_numbers'>numbers</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1494
|
+
<span class='kw'>end</span></pre>
|
1495
|
+
</td>
|
1496
|
+
</tr>
|
1497
|
+
</table>
|
1498
|
+
</div>
|
1499
|
+
|
1500
|
+
<div class="method_details ">
|
1501
|
+
<h3 class="signature " id="numbers_spoken-instance_method">
|
1502
|
+
|
1503
|
+
- (<tt>Object</tt>) <strong>numbers_spoken</strong>
|
1504
|
+
|
1505
|
+
|
1506
|
+
|
1507
|
+
|
1508
|
+
|
1509
|
+
</h3><table class="source_code">
|
1510
|
+
<tr>
|
1511
|
+
<td>
|
1512
|
+
<pre class="lines">
|
1513
|
+
|
1514
|
+
|
1515
|
+
162
|
1516
|
+
163</pre>
|
1517
|
+
</td>
|
1518
|
+
<td>
|
1519
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 162</span>
|
1520
|
+
|
1521
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_numbers_spoken'>numbers_spoken</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
1522
|
+
<span class='kw'>end</span></pre>
|
1523
|
+
</td>
|
1524
|
+
</tr>
|
1525
|
+
</table>
|
1526
|
+
</div>
|
1527
|
+
|
1528
|
+
<div class="method_details ">
|
1529
|
+
<h3 class="signature " id="random_letters-instance_method">
|
1530
|
+
|
1531
|
+
- (<tt>Object</tt>) <strong>random_letters</strong>(options = {})
|
1532
|
+
|
1533
|
+
|
1534
|
+
|
1535
|
+
|
1536
|
+
|
1537
|
+
</h3><table class="source_code">
|
1538
|
+
<tr>
|
1539
|
+
<td>
|
1540
|
+
<pre class="lines">
|
1541
|
+
|
1542
|
+
|
1543
|
+
146
|
1544
|
+
147
|
1545
|
+
148</pre>
|
1546
|
+
</td>
|
1547
|
+
<td>
|
1548
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 146</span>
|
1549
|
+
|
1550
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_random_letters'>random_letters</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1551
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_random_letters'>random_letters</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1552
|
+
<span class='kw'>end</span></pre>
|
1553
|
+
</td>
|
1554
|
+
</tr>
|
1555
|
+
</table>
|
1556
|
+
</div>
|
1557
|
+
|
1558
|
+
<div class="method_details ">
|
1559
|
+
<h3 class="signature " id="random_letters_numbers-instance_method">
|
1560
|
+
|
1561
|
+
- (<tt>Object</tt>) <strong>random_letters_numbers</strong>(options = {})
|
1562
|
+
|
1563
|
+
|
1564
|
+
|
1565
|
+
|
1566
|
+
|
1567
|
+
</h3><table class="source_code">
|
1568
|
+
<tr>
|
1569
|
+
<td>
|
1570
|
+
<pre class="lines">
|
1571
|
+
|
1572
|
+
|
1573
|
+
141
|
1574
|
+
142
|
1575
|
+
143
|
1576
|
+
144</pre>
|
1577
|
+
</td>
|
1578
|
+
<td>
|
1579
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 141</span>
|
1580
|
+
|
1581
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_random_letters_numbers'>random_letters_numbers</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1582
|
+
<span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge!'>merge!</span><span class='lparen'>(</span><span class='label'>letters_numbers:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
1583
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_random_letters_numbers'>random_letters_numbers</span> <span class='id identifier rubyid_options'>options</span>
|
1584
|
+
<span class='kw'>end</span></pre>
|
1585
|
+
</td>
|
1586
|
+
</tr>
|
1587
|
+
</table>
|
1588
|
+
</div>
|
1589
|
+
|
1590
|
+
<div class="method_details ">
|
1591
|
+
<h3 class="signature " id="random_numbers-instance_method">
|
1592
|
+
|
1593
|
+
- (<tt>Object</tt>) <strong>random_numbers</strong>(options = {})
|
1594
|
+
|
1595
|
+
|
1596
|
+
|
1597
|
+
|
1598
|
+
|
1599
|
+
</h3><table class="source_code">
|
1600
|
+
<tr>
|
1601
|
+
<td>
|
1602
|
+
<pre class="lines">
|
1603
|
+
|
1604
|
+
|
1605
|
+
150
|
1606
|
+
151
|
1607
|
+
152</pre>
|
1608
|
+
</td>
|
1609
|
+
<td>
|
1610
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 150</span>
|
1611
|
+
|
1612
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_random_numbers'>random_numbers</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
|
1613
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_random_numbers'>random_numbers</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
1614
|
+
<span class='kw'>end</span></pre>
|
1615
|
+
</td>
|
1616
|
+
</tr>
|
1617
|
+
</table>
|
1618
|
+
</div>
|
1619
|
+
|
1620
|
+
<div class="method_details ">
|
1621
|
+
<h3 class="signature " id="reload-instance_method">
|
1622
|
+
|
1623
|
+
- (<tt>Object</tt>) <strong>reload</strong>
|
1624
|
+
|
1625
|
+
|
1626
|
+
|
1627
|
+
|
1628
|
+
|
1629
|
+
</h3><div class="docstring">
|
1630
|
+
<div class="discussion">
|
1631
|
+
|
1632
|
+
<p>def add_noise</p>
|
1633
|
+
|
1634
|
+
<pre class="code ruby"><code class="ruby"> Params.noise = true
|
1635
|
+
end</code></pre>
|
1636
|
+
|
1637
|
+
|
1638
|
+
</div>
|
1639
|
+
</div>
|
1640
|
+
<div class="tags">
|
1641
|
+
|
1642
|
+
|
1643
|
+
</div><table class="source_code">
|
1644
|
+
<tr>
|
1645
|
+
<td>
|
1646
|
+
<pre class="lines">
|
1647
|
+
|
1648
|
+
|
1649
|
+
169
|
1650
|
+
170
|
1651
|
+
171</pre>
|
1652
|
+
</td>
|
1653
|
+
<td>
|
1654
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 169</span>
|
1655
|
+
|
1656
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_reload'>reload</span>
|
1657
|
+
<span class='id identifier rubyid_load_words'>load_words</span><span class='lparen'>(</span><span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_dictionary'>dictionary</span><span class='rparen'>)</span>
|
1658
|
+
<span class='kw'>end</span></pre>
|
1659
|
+
</td>
|
1660
|
+
</tr>
|
1661
|
+
</table>
|
1662
|
+
</div>
|
1663
|
+
|
1664
|
+
<div class="method_details ">
|
1665
|
+
<h3 class="signature " id="reverse-instance_method">
|
1666
|
+
|
1667
|
+
- (<tt>Object</tt>) <strong>reverse</strong>
|
1668
|
+
|
1669
|
+
|
1670
|
+
|
1671
|
+
|
1672
|
+
|
1673
|
+
</h3><table class="source_code">
|
1674
|
+
<tr>
|
1675
|
+
<td>
|
1676
|
+
<pre class="lines">
|
1677
|
+
|
1678
|
+
|
1679
|
+
133
|
1680
|
+
134
|
1681
|
+
135</pre>
|
1682
|
+
</td>
|
1683
|
+
<td>
|
1684
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 133</span>
|
1685
|
+
|
1686
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_reverse'>reverse</span>
|
1687
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_reverse'>reverse</span>
|
1688
|
+
<span class='kw'>end</span></pre>
|
1689
|
+
</td>
|
1690
|
+
</tr>
|
1691
|
+
</table>
|
1692
|
+
</div>
|
1693
|
+
|
1694
|
+
<div class="method_details ">
|
1695
|
+
<h3 class="signature " id="set_tone_type-instance_method">
|
1696
|
+
|
1697
|
+
- (<tt>Object</tt>) <strong>set_tone_type</strong>(type)
|
1698
|
+
|
1699
|
+
|
1700
|
+
|
1701
|
+
|
1702
|
+
|
1703
|
+
</h3><table class="source_code">
|
1704
|
+
<tr>
|
1705
|
+
<td>
|
1706
|
+
<pre class="lines">
|
1707
|
+
|
1708
|
+
|
1709
|
+
204
|
1710
|
+
205
|
1711
|
+
206
|
1712
|
+
207
|
1713
|
+
208
|
1714
|
+
209</pre>
|
1715
|
+
</td>
|
1716
|
+
<td>
|
1717
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 204</span>
|
1718
|
+
|
1719
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_set_tone_type'>set_tone_type</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
1720
|
+
<span class='kw'>case</span> <span class='id identifier rubyid_type'>type</span>
|
1721
|
+
<span class='kw'>when</span> <span class='symbol'>:squarewave</span><span class='comma'>,</span> <span class='symbol'>:sawtooth</span><span class='comma'>,</span> <span class='symbol'>:sinewave</span>
|
1722
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_tone'>tone</span> <span class='op'>=</span> <span class='id identifier rubyid_type'>type</span>
|
1723
|
+
<span class='kw'>end</span>
|
1724
|
+
<span class='kw'>end</span></pre>
|
1725
|
+
</td>
|
1726
|
+
</tr>
|
1727
|
+
</table>
|
1728
|
+
</div>
|
1729
|
+
|
1730
|
+
<div class="method_details ">
|
1731
|
+
<h3 class="signature " id="word_count-instance_method">
|
1732
|
+
|
1733
|
+
- (<tt>Object</tt>) <strong>word_count</strong>(wordcount)
|
1734
|
+
|
1735
|
+
|
1736
|
+
|
1737
|
+
|
1738
|
+
|
1739
|
+
</h3><table class="source_code">
|
1740
|
+
<tr>
|
1741
|
+
<td>
|
1742
|
+
<pre class="lines">
|
1743
|
+
|
1744
|
+
|
1745
|
+
113
|
1746
|
+
114
|
1747
|
+
115
|
1748
|
+
116</pre>
|
1749
|
+
</td>
|
1750
|
+
<td>
|
1751
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 113</span>
|
1752
|
+
|
1753
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_word_count'>word_count</span><span class='lparen'>(</span><span class='id identifier rubyid_wordcount'>wordcount</span><span class='rparen'>)</span>
|
1754
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_word_count'>word_count</span> <span class='op'>=</span> <span class='id identifier rubyid_wordcount'>wordcount</span>
|
1755
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='id identifier rubyid_wordcount'>wordcount</span>
|
1756
|
+
<span class='kw'>end</span></pre>
|
1757
|
+
</td>
|
1758
|
+
</tr>
|
1759
|
+
</table>
|
1760
|
+
</div>
|
1761
|
+
|
1762
|
+
<div class="method_details ">
|
1763
|
+
<h3 class="signature " id="word_size-instance_method">
|
1764
|
+
|
1765
|
+
- (<tt>Object</tt>) <strong>word_size</strong>(size = nil)
|
1766
|
+
|
1767
|
+
|
1768
|
+
|
1769
|
+
|
1770
|
+
|
1771
|
+
</h3><table class="source_code">
|
1772
|
+
<tr>
|
1773
|
+
<td>
|
1774
|
+
<pre class="lines">
|
1775
|
+
|
1776
|
+
|
1777
|
+
95
|
1778
|
+
96
|
1779
|
+
97
|
1780
|
+
98
|
1781
|
+
99
|
1782
|
+
100
|
1783
|
+
101</pre>
|
1784
|
+
</td>
|
1785
|
+
<td>
|
1786
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 95</span>
|
1787
|
+
|
1788
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_word_size'>word_size</span><span class='lparen'>(</span><span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1789
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_size'>size</span>
|
1790
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>=</span> <span class='id identifier rubyid_size'>size</span>
|
1791
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_word_size'>word_size</span> <span class='id identifier rubyid_size'>size</span>
|
1792
|
+
<span class='kw'>end</span>
|
1793
|
+
<span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
|
1794
|
+
<span class='kw'>end</span></pre>
|
1795
|
+
</td>
|
1796
|
+
</tr>
|
1797
|
+
</table>
|
1798
|
+
</div>
|
1799
|
+
|
1800
|
+
<div class="method_details ">
|
1801
|
+
<h3 class="signature " id="words-instance_method">
|
1802
|
+
|
1803
|
+
- (<tt>Object</tt>) <strong>words</strong>
|
1804
|
+
|
1805
|
+
|
1806
|
+
|
1807
|
+
|
1808
|
+
|
1809
|
+
</h3><table class="source_code">
|
1810
|
+
<tr>
|
1811
|
+
<td>
|
1812
|
+
<pre class="lines">
|
1813
|
+
|
1814
|
+
|
1815
|
+
87
|
1816
|
+
88
|
1817
|
+
89</pre>
|
1818
|
+
</td>
|
1819
|
+
<td>
|
1820
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 87</span>
|
1821
|
+
|
1822
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_words'>words</span>
|
1823
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span>
|
1824
|
+
<span class='kw'>end</span></pre>
|
1825
|
+
</td>
|
1826
|
+
</tr>
|
1827
|
+
</table>
|
1828
|
+
</div>
|
1829
|
+
|
1830
|
+
<div class="method_details ">
|
1831
|
+
<h3 class="signature " id="words=-instance_method">
|
1832
|
+
|
1833
|
+
- (<tt>Object</tt>) <strong>words=</strong>(words)
|
1834
|
+
|
1835
|
+
|
1836
|
+
|
1837
|
+
|
1838
|
+
|
1839
|
+
</h3><table class="source_code">
|
1840
|
+
<tr>
|
1841
|
+
<td>
|
1842
|
+
<pre class="lines">
|
1843
|
+
|
1844
|
+
|
1845
|
+
91
|
1846
|
+
92
|
1847
|
+
93</pre>
|
1848
|
+
</td>
|
1849
|
+
<td>
|
1850
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_dsl.rb', line 91</span>
|
1851
|
+
|
1852
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_words='>words=</span> <span class='id identifier rubyid_words'>words</span>
|
1853
|
+
<span class='ivar'>@words</span><span class='period'>.</span><span class='id identifier rubyid_add'>add</span> <span class='id identifier rubyid_words'>words</span>
|
1854
|
+
<span class='kw'>end</span></pre>
|
1855
|
+
</td>
|
1856
|
+
</tr>
|
1857
|
+
</table>
|
1858
|
+
</div>
|
1859
|
+
|
1860
|
+
</div>
|
1861
|
+
|
1862
|
+
</div>
|
1863
|
+
|
1864
|
+
<div id="footer">
|
1865
|
+
Generated on Mon May 23 21:20:16 2016 by
|
1866
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1867
|
+
0.8.7.6 (ruby-2.2.0).
|
1868
|
+
</div>
|
1869
|
+
|
1870
|
+
</body>
|
1871
|
+
</html>
|