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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/.yardoc/checksums +33 -0
  3. data/.yardoc/object_types +0 -0
  4. data/.yardoc/objects/root.dat +0 -0
  5. data/.yardoc/proxy_types +0 -0
  6. data/cw.gemspec +1 -1
  7. data/doc/Alphabet.html +433 -0
  8. data/doc/AudioPlayer.html +805 -0
  9. data/doc/Book.html +3134 -0
  10. data/doc/BookDetails.html +664 -0
  11. data/doc/CW.html +849 -0
  12. data/doc/CWThreads.html +514 -0
  13. data/doc/Cl.html +1125 -0
  14. data/doc/CurrentWord.html +636 -0
  15. data/doc/CwDsl.html +1871 -0
  16. data/doc/CwEncoding.html +329 -0
  17. data/doc/FileDetails.html +236 -0
  18. data/doc/KeyInput.html +758 -0
  19. data/doc/MonitorKeys.html +482 -0
  20. data/doc/Numbers.html +433 -0
  21. data/doc/Params.html +352 -0
  22. data/doc/Print.html +1130 -0
  23. data/doc/Print/ProgressPrint.html +419 -0
  24. data/doc/Process.html +202 -0
  25. data/doc/Progress.html +337 -0
  26. data/doc/Randomize.html +959 -0
  27. data/doc/RepeatWord.html +816 -0
  28. data/doc/Rss.html +630 -0
  29. data/doc/Sentence.html +1457 -0
  30. data/doc/Spoken.html +215 -0
  31. data/doc/Str.html +771 -0
  32. data/doc/Stream.html +1401 -0
  33. data/doc/TestLetters.html +586 -0
  34. data/doc/TestWords.html +646 -0
  35. data/doc/Tester.html +3064 -0
  36. data/doc/Timing.html +1244 -0
  37. data/doc/ToneGenerator.html +2111 -0
  38. data/doc/Voice.html +273 -0
  39. data/doc/Words.html +1750 -0
  40. data/doc/_index.html +376 -0
  41. data/doc/class_list.html +58 -0
  42. data/doc/css/common.css +1 -0
  43. data/doc/css/full_list.css +57 -0
  44. data/doc/css/style.css +339 -0
  45. data/doc/file.README.html +148 -0
  46. data/doc/file_list.html +60 -0
  47. data/doc/frames.html +26 -0
  48. data/doc/index.html +148 -0
  49. data/doc/js/app.js +219 -0
  50. data/doc/js/full_list.js +181 -0
  51. data/doc/js/jquery.js +4 -0
  52. data/doc/method_list.html +2697 -0
  53. data/doc/monitor.html +435 -0
  54. data/doc/top-level-namespace.html +114 -0
  55. metadata +53 -1
@@ -0,0 +1,805 @@
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: AudioPlayer
8
+
9
+ &mdash; 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#!AudioPlayer.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 (A)</a> &raquo;
35
+
36
+
37
+ <span class="title">AudioPlayer</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: AudioPlayer
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">AudioPlayer</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/audio_player.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>
111
+ Instance Method Summary
112
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
113
+ </h2>
114
+
115
+ <ul class="summary">
116
+
117
+ <li class="public ">
118
+ <span class="summary_signature">
119
+
120
+ <a href="#convert_words-instance_method" title="#convert_words (instance method)">- (Object) <strong>convert_words</strong>(words) </a>
121
+
122
+
123
+
124
+ </span>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <span class="summary_desc"><div class='inline'></div></span>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#convert_words_with_ebook2cw-instance_method" title="#convert_words_with_ebook2cw (instance method)">- (Object) <strong>convert_words_with_ebook2cw</strong>(words) </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'></div></span>
157
+
158
+ </li>
159
+
160
+
161
+ <li class="public ">
162
+ <span class="summary_signature">
163
+
164
+ <a href="#play-instance_method" title="#play (instance method)">- (Object) <strong>play</strong> </a>
165
+
166
+
167
+
168
+ </span>
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+ <span class="summary_desc"><div class='inline'></div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#play_cmd_for_ps-instance_method" title="#play_cmd_for_ps (instance method)">- (Object) <strong>play_cmd_for_ps</strong> </a>
187
+
188
+
189
+
190
+ </span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'></div></span>
201
+
202
+ </li>
203
+
204
+
205
+ <li class="public ">
206
+ <span class="summary_signature">
207
+
208
+ <a href="#play_command-instance_method" title="#play_command (instance method)">- (Object) <strong>play_command</strong> </a>
209
+
210
+
211
+
212
+ </span>
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+ <span class="summary_desc"><div class='inline'></div></span>
223
+
224
+ </li>
225
+
226
+
227
+ <li class="public ">
228
+ <span class="summary_signature">
229
+
230
+ <a href="#play_filename-instance_method" title="#play_filename (instance method)">- (Object) <strong>play_filename</strong> </a>
231
+
232
+
233
+
234
+ </span>
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+ <span class="summary_desc"><div class='inline'></div></span>
245
+
246
+ </li>
247
+
248
+
249
+ <li class="public ">
250
+ <span class="summary_signature">
251
+
252
+ <a href="#play_filename_for_ebook2cw-instance_method" title="#play_filename_for_ebook2cw (instance method)">- (Object) <strong>play_filename_for_ebook2cw</strong> </a>
253
+
254
+
255
+
256
+ </span>
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ <span class="summary_desc"><div class='inline'></div></span>
267
+
268
+ </li>
269
+
270
+
271
+ <li class="public ">
272
+ <span class="summary_signature">
273
+
274
+ <a href="#play_tone-instance_method" title="#play_tone (instance method)">- (Object) <strong>play_tone</strong>(tone) </a>
275
+
276
+
277
+
278
+ </span>
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+ <span class="summary_desc"><div class='inline'></div></span>
289
+
290
+ </li>
291
+
292
+
293
+ <li class="public ">
294
+ <span class="summary_signature">
295
+
296
+ <a href="#startup_delay-instance_method" title="#startup_delay (instance method)">- (Object) <strong>startup_delay</strong> </a>
297
+
298
+
299
+
300
+ </span>
301
+
302
+
303
+
304
+
305
+
306
+
307
+
308
+
309
+
310
+ <span class="summary_desc"><div class='inline'></div></span>
311
+
312
+ </li>
313
+
314
+
315
+ <li class="public ">
316
+ <span class="summary_signature">
317
+
318
+ <a href="#still_playing%3F-instance_method" title="#still_playing? (instance method)">- (Boolean) <strong>still_playing?</strong> </a>
319
+
320
+
321
+
322
+ </span>
323
+
324
+
325
+
326
+
327
+
328
+
329
+
330
+
331
+
332
+ <span class="summary_desc"><div class='inline'></div></span>
333
+
334
+ </li>
335
+
336
+
337
+ <li class="public ">
338
+ <span class="summary_signature">
339
+
340
+ <a href="#stop-instance_method" title="#stop (instance method)">- (Object) <strong>stop</strong> </a>
341
+
342
+
343
+
344
+ </span>
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+
353
+
354
+ <span class="summary_desc"><div class='inline'></div></span>
355
+
356
+ </li>
357
+
358
+
359
+ <li class="public ">
360
+ <span class="summary_signature">
361
+
362
+ <a href="#tone-instance_method" title="#tone (instance method)">- (Object) <strong>tone</strong> </a>
363
+
364
+
365
+
366
+ </span>
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+ <span class="summary_desc"><div class='inline'></div></span>
377
+
378
+ </li>
379
+
380
+
381
+ </ul>
382
+
383
+
384
+
385
+
386
+ <div id="instance_method_details" class="method_details_list">
387
+ <h2>Instance Method Details</h2>
388
+
389
+
390
+ <div class="method_details first">
391
+ <h3 class="signature first" id="convert_words-instance_method">
392
+
393
+ - (<tt>Object</tt>) <strong>convert_words</strong>(words)
394
+
395
+
396
+
397
+
398
+
399
+ </h3><table class="source_code">
400
+ <tr>
401
+ <td>
402
+ <pre class="lines">
403
+
404
+
405
+ 23
406
+ 24
407
+ 25
408
+ 26</pre>
409
+ </td>
410
+ <td>
411
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 23</span>
412
+
413
+ <span class='kw'>def</span> <span class='id identifier rubyid_convert_words'>convert_words</span> <span class='id identifier rubyid_words'>words</span>
414
+ <span class='id identifier rubyid_tone'>tone</span><span class='period'>.</span><span class='id identifier rubyid_generate'>generate</span> <span class='id identifier rubyid_words'>words</span> <span class='kw'>unless</span> <span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_use_ebook2cw'>use_ebook2cw</span>
415
+ <span class='id identifier rubyid_convert_words_with_ebook2cw'>convert_words_with_ebook2cw</span> <span class='id identifier rubyid_words'>words</span> <span class='kw'>if</span> <span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_use_ebook2cw'>use_ebook2cw</span>
416
+ <span class='kw'>end</span></pre>
417
+ </td>
418
+ </tr>
419
+ </table>
420
+ </div>
421
+
422
+ <div class="method_details ">
423
+ <h3 class="signature " id="convert_words_with_ebook2cw-instance_method">
424
+
425
+ - (<tt>Object</tt>) <strong>convert_words_with_ebook2cw</strong>(words)
426
+
427
+
428
+
429
+
430
+
431
+ </h3><table class="source_code">
432
+ <tr>
433
+ <td>
434
+ <pre class="lines">
435
+
436
+
437
+ 17
438
+ 18
439
+ 19
440
+ 20
441
+ 21</pre>
442
+ </td>
443
+ <td>
444
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 17</span>
445
+
446
+ <span class='kw'>def</span> <span class='id identifier rubyid_convert_words_with_ebook2cw'>convert_words_with_ebook2cw</span> <span class='id identifier rubyid_words'>words</span>
447
+ <span class='id identifier rubyid_words'>words</span> <span class='op'>=</span> <span class='id identifier rubyid_words'>words</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
448
+ <span class='id identifier rubyid_cl'>cl</span> <span class='op'>=</span> <span class='const'>Cl</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='period'>.</span><span class='id identifier rubyid_cl_echo'>cl_echo</span><span class='lparen'>(</span><span class='id identifier rubyid_words'>words</span><span class='rparen'>)</span>
449
+ <span class='op'>!</span> <span class='ivar'>@dry_run</span> <span class='op'>?</span> <span class='backtick'>`</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_cl'>cl</span><span class='embexpr_end'>}</span><span class='tstring_end'>`</span></span> <span class='op'>:</span> <span class='id identifier rubyid_cl'>cl</span>
450
+ <span class='kw'>end</span></pre>
451
+ </td>
452
+ </tr>
453
+ </table>
454
+ </div>
455
+
456
+ <div class="method_details ">
457
+ <h3 class="signature " id="play-instance_method">
458
+
459
+ - (<tt>Object</tt>) <strong>play</strong>
460
+
461
+
462
+
463
+
464
+
465
+ </h3><table class="source_code">
466
+ <tr>
467
+ <td>
468
+ <pre class="lines">
469
+
470
+
471
+ 33
472
+ 34
473
+ 35
474
+ 36</pre>
475
+ </td>
476
+ <td>
477
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 33</span>
478
+
479
+ <span class='kw'>def</span> <span class='id identifier rubyid_play'>play</span>
480
+ <span class='id identifier rubyid_cmd'>cmd</span> <span class='op'>=</span> <span class='id identifier rubyid_play_command'>play_command</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span> <span class='op'>+</span> <span class='id identifier rubyid_play_filename'>play_filename</span>
481
+ <span class='ivar'>@pid</span> <span class='op'>=</span> <span class='op'>!</span> <span class='ivar'>@dry_run</span> <span class='op'>?</span> <span class='const'>Process</span><span class='period'>.</span><span class='id identifier rubyid_spawn'>spawn</span><span class='lparen'>(</span><span class='id identifier rubyid_cmd'>cmd</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='id identifier rubyid_cmd'>cmd</span>
482
+ <span class='kw'>end</span></pre>
483
+ </td>
484
+ </tr>
485
+ </table>
486
+ </div>
487
+
488
+ <div class="method_details ">
489
+ <h3 class="signature " id="play_cmd_for_ps-instance_method">
490
+
491
+ - (<tt>Object</tt>) <strong>play_cmd_for_ps</strong>
492
+
493
+
494
+
495
+
496
+
497
+ </h3><table class="source_code">
498
+ <tr>
499
+ <td>
500
+ <pre class="lines">
501
+
502
+
503
+ 50
504
+ 51
505
+ 52</pre>
506
+ </td>
507
+ <td>
508
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 50</span>
509
+
510
+ <span class='kw'>def</span> <span class='id identifier rubyid_play_cmd_for_ps'>play_cmd_for_ps</span>
511
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>[</span><span class='tstring_end'>&#39;</span></span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_play_command'>play_command</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>]</span><span class='tstring_end'>&#39;</span></span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_play_command'>play_command</span><span class='lbracket'>[</span><span class='int'>1</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span>
512
+ <span class='kw'>end</span></pre>
513
+ </td>
514
+ </tr>
515
+ </table>
516
+ </div>
517
+
518
+ <div class="method_details ">
519
+ <h3 class="signature " id="play_command-instance_method">
520
+
521
+ - (<tt>Object</tt>) <strong>play_command</strong>
522
+
523
+
524
+
525
+
526
+
527
+ </h3><table class="source_code">
528
+ <tr>
529
+ <td>
530
+ <pre class="lines">
531
+
532
+
533
+ 9
534
+ 10
535
+ 11</pre>
536
+ </td>
537
+ <td>
538
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 9</span>
539
+
540
+ <span class='kw'>def</span> <span class='id identifier rubyid_play_command'>play_command</span>
541
+ <span class='ivar'>@play_command</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>afplay</span><span class='tstring_end'>&#39;</span></span>
542
+ <span class='kw'>end</span></pre>
543
+ </td>
544
+ </tr>
545
+ </table>
546
+ </div>
547
+
548
+ <div class="method_details ">
549
+ <h3 class="signature " id="play_filename-instance_method">
550
+
551
+ - (<tt>Object</tt>) <strong>play_filename</strong>
552
+
553
+
554
+
555
+
556
+
557
+ </h3><table class="source_code">
558
+ <tr>
559
+ <td>
560
+ <pre class="lines">
561
+
562
+
563
+ 28
564
+ 29
565
+ 30
566
+ 31</pre>
567
+ </td>
568
+ <td>
569
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 28</span>
570
+
571
+ <span class='kw'>def</span> <span class='id identifier rubyid_play_filename'>play_filename</span>
572
+ <span class='kw'>return</span> <span class='id identifier rubyid_play_filename_for_ebook2cw'>play_filename_for_ebook2cw</span> <span class='kw'>if</span> <span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_use_ebook2cw'>use_ebook2cw</span>
573
+ <span class='id identifier rubyid_tone'>tone</span><span class='period'>.</span><span class='id identifier rubyid_play_filename'>play_filename</span>
574
+ <span class='kw'>end</span></pre>
575
+ </td>
576
+ </tr>
577
+ </table>
578
+ </div>
579
+
580
+ <div class="method_details ">
581
+ <h3 class="signature " id="play_filename_for_ebook2cw-instance_method">
582
+
583
+ - (<tt>Object</tt>) <strong>play_filename_for_ebook2cw</strong>
584
+
585
+
586
+
587
+
588
+
589
+ </h3><table class="source_code">
590
+ <tr>
591
+ <td>
592
+ <pre class="lines">
593
+
594
+
595
+ 13
596
+ 14
597
+ 15</pre>
598
+ </td>
599
+ <td>
600
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 13</span>
601
+
602
+ <span class='kw'>def</span> <span class='id identifier rubyid_play_filename_for_ebook2cw'>play_filename_for_ebook2cw</span>
603
+ <span class='ivar'>@play_filename</span> <span class='op'>||=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_audio_dir'>audio_dir</span><span class='embexpr_end'>}</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_audio_filename'>audio_filename</span><span class='embexpr_end'>}</span><span class='tstring_content'>0000.mp3</span><span class='tstring_end'>&quot;</span></span>
604
+ <span class='kw'>end</span></pre>
605
+ </td>
606
+ </tr>
607
+ </table>
608
+ </div>
609
+
610
+ <div class="method_details ">
611
+ <h3 class="signature " id="play_tone-instance_method">
612
+
613
+ - (<tt>Object</tt>) <strong>play_tone</strong>(tone)
614
+
615
+
616
+
617
+
618
+
619
+ </h3><table class="source_code">
620
+ <tr>
621
+ <td>
622
+ <pre class="lines">
623
+
624
+
625
+ 46
626
+ 47
627
+ 48</pre>
628
+ </td>
629
+ <td>
630
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 46</span>
631
+
632
+ <span class='kw'>def</span> <span class='id identifier rubyid_play_tone'>play_tone</span> <span class='id identifier rubyid_tone'>tone</span>
633
+ <span class='backtick'>`</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_play_command'>play_command</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span> <span class='op'>+</span> <span class='id identifier rubyid_tone'>tone</span><span class='embexpr_end'>}</span><span class='tstring_end'>`</span></span>
634
+ <span class='kw'>end</span></pre>
635
+ </td>
636
+ </tr>
637
+ </table>
638
+ </div>
639
+
640
+ <div class="method_details ">
641
+ <h3 class="signature " id="startup_delay-instance_method">
642
+
643
+ - (<tt>Object</tt>) <strong>startup_delay</strong>
644
+
645
+
646
+
647
+
648
+
649
+ </h3><table class="source_code">
650
+ <tr>
651
+ <td>
652
+ <pre class="lines">
653
+
654
+
655
+ 60
656
+ 61
657
+ 62</pre>
658
+ </td>
659
+ <td>
660
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 60</span>
661
+
662
+ <span class='kw'>def</span> <span class='id identifier rubyid_startup_delay'>startup_delay</span>
663
+ <span class='float'>0.2</span>
664
+ <span class='kw'>end</span></pre>
665
+ </td>
666
+ </tr>
667
+ </table>
668
+ </div>
669
+
670
+ <div class="method_details ">
671
+ <h3 class="signature " id="still_playing?-instance_method">
672
+
673
+ - (<tt>Boolean</tt>) <strong>still_playing?</strong>
674
+
675
+
676
+
677
+
678
+
679
+ </h3><div class="docstring">
680
+ <div class="discussion">
681
+
682
+
683
+ </div>
684
+ </div>
685
+ <div class="tags">
686
+
687
+ <p class="tag_title">Returns:</p>
688
+ <ul class="return">
689
+
690
+ <li>
691
+
692
+
693
+ <span class='type'>(<tt>Boolean</tt>)</span>
694
+
695
+
696
+
697
+ </li>
698
+
699
+ </ul>
700
+
701
+ </div><table class="source_code">
702
+ <tr>
703
+ <td>
704
+ <pre class="lines">
705
+
706
+
707
+ 54
708
+ 55
709
+ 56
710
+ 57
711
+ 58</pre>
712
+ </td>
713
+ <td>
714
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 54</span>
715
+
716
+ <span class='kw'>def</span> <span class='id identifier rubyid_still_playing?'>still_playing?</span>
717
+ <span class='id identifier rubyid_ps'>ps</span> <span class='op'>=</span> <span class='backtick'>`</span><span class='tstring_content'>ps -ewwo pid,args | grep </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_play_cmd_for_ps'>play_cmd_for_ps</span><span class='embexpr_end'>}</span><span class='tstring_end'>`</span></span>
718
+ <span class='kw'>return</span> <span class='id identifier rubyid_ps'>ps</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_play_filename_for_ebook2cw'>play_filename_for_ebook2cw</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_use_ebook2cw'>use_ebook2cw</span>
719
+ <span class='kw'>return</span> <span class='id identifier rubyid_ps'>ps</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span> <span class='id identifier rubyid_tone'>tone</span><span class='period'>.</span><span class='id identifier rubyid_play_filename'>play_filename</span> <span class='kw'>unless</span> <span class='const'>Params</span><span class='period'>.</span><span class='id identifier rubyid_use_ebook2cw'>use_ebook2cw</span>
720
+ <span class='kw'>end</span></pre>
721
+ </td>
722
+ </tr>
723
+ </table>
724
+ </div>
725
+
726
+ <div class="method_details ">
727
+ <h3 class="signature " id="stop-instance_method">
728
+
729
+ - (<tt>Object</tt>) <strong>stop</strong>
730
+
731
+
732
+
733
+
734
+
735
+ </h3><table class="source_code">
736
+ <tr>
737
+ <td>
738
+ <pre class="lines">
739
+
740
+
741
+ 38
742
+ 39
743
+ 40
744
+ 41
745
+ 42
746
+ 43
747
+ 44</pre>
748
+ </td>
749
+ <td>
750
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 38</span>
751
+
752
+ <span class='kw'>def</span> <span class='id identifier rubyid_stop'>stop</span>
753
+ <span class='kw'>begin</span>
754
+ <span class='const'>Process</span><span class='period'>.</span><span class='id identifier rubyid_kill'>kill</span><span class='lparen'>(</span><span class='symbol'>:TERM</span><span class='comma'>,</span> <span class='ivar'>@pid</span><span class='rparen'>)</span>
755
+ <span class='const'>Process</span><span class='period'>.</span><span class='id identifier rubyid_wait'>wait</span><span class='lparen'>(</span><span class='ivar'>@pid</span><span class='rparen'>)</span>
756
+ <span class='kw'>rescue</span>
757
+ <span class='kw'>end</span>
758
+ <span class='kw'>end</span></pre>
759
+ </td>
760
+ </tr>
761
+ </table>
762
+ </div>
763
+
764
+ <div class="method_details ">
765
+ <h3 class="signature " id="tone-instance_method">
766
+
767
+ - (<tt>Object</tt>) <strong>tone</strong>
768
+
769
+
770
+
771
+
772
+
773
+ </h3><table class="source_code">
774
+ <tr>
775
+ <td>
776
+ <pre class="lines">
777
+
778
+
779
+ 5
780
+ 6
781
+ 7</pre>
782
+ </td>
783
+ <td>
784
+ <pre class="code"><span class="info file"># File 'lib/cw/audio_player.rb', line 5</span>
785
+
786
+ <span class='kw'>def</span> <span class='id identifier rubyid_tone'>tone</span>
787
+ <span class='ivar'>@tone</span> <span class='op'>||=</span> <span class='const'>ToneGenerator</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
788
+ <span class='kw'>end</span></pre>
789
+ </td>
790
+ </tr>
791
+ </table>
792
+ </div>
793
+
794
+ </div>
795
+
796
+ </div>
797
+
798
+ <div id="footer">
799
+ Generated on Mon May 23 21:20:17 2016 by
800
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
801
+ 0.8.7.6 (ruby-2.2.0).
802
+ </div>
803
+
804
+ </body>
805
+ </html>