cw 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
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,1130 @@
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: Print
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#!Print.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 (P)</a> &raquo;
35
+
36
+
37
+ <span class="title">Print</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: Print
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">Print</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/print.rb</dd>
98
+
99
+ </dl>
100
+ <div class="clear"></div>
101
+
102
+ <h2>Defined Under Namespace</h2>
103
+ <p class="children">
104
+
105
+
106
+
107
+
108
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Print/ProgressPrint.html" title="Print::ProgressPrint (class)">ProgressPrint</a></span>
109
+
110
+
111
+ </p>
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+ <h2>
121
+ Instance Method Summary
122
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
123
+ </h2>
124
+
125
+ <ul class="summary">
126
+
127
+ <li class="public ">
128
+ <span class="summary_signature">
129
+
130
+ <a href="#char_result-instance_method" title="#char_result (instance method)">- (Object) <strong>char_result</strong>(popped) </a>
131
+
132
+
133
+
134
+ </span>
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+ <span class="summary_desc"><div class='inline'></div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#console_size-instance_method" title="#console_size (instance method)">- (Object) <strong>console_size</strong> </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ <span class="summary_desc"><div class='inline'></div></span>
167
+
168
+ </li>
169
+
170
+
171
+ <li class="public ">
172
+ <span class="summary_signature">
173
+
174
+ <a href="#force_newline_maybe-instance_method" title="#force_newline_maybe (instance method)">- (Object) <strong>force_newline_maybe</strong> </a>
175
+
176
+
177
+
178
+ </span>
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+ <span class="summary_desc"><div class='inline'></div></span>
189
+
190
+ </li>
191
+
192
+
193
+ <li class="public ">
194
+ <span class="summary_signature">
195
+
196
+ <a href="#heading-instance_method" title="#heading (instance method)">- (Object) <strong>heading</strong> </a>
197
+
198
+
199
+
200
+ </span>
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+ <span class="summary_desc"><div class='inline'></div></span>
211
+
212
+ </li>
213
+
214
+
215
+ <li class="public ">
216
+ <span class="summary_signature">
217
+
218
+ <a href="#initialize-instance_method" title="#initialize (instance method)">- (Print) <strong>initialize</strong> </a>
219
+
220
+
221
+
222
+ </span>
223
+
224
+
225
+ <span class="note title constructor">constructor</span>
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+ <span class="summary_desc"><div class='inline'>
235
+ <p>A new instance of Print.</p>
236
+ </div></span>
237
+
238
+ </li>
239
+
240
+
241
+ <li class="public ">
242
+ <span class="summary_signature">
243
+
244
+ <a href="#newline-instance_method" title="#newline (instance method)">- (Object) <strong>newline</strong> </a>
245
+
246
+
247
+
248
+ </span>
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+
257
+
258
+ <span class="summary_desc"><div class='inline'></div></span>
259
+
260
+ </li>
261
+
262
+
263
+ <li class="public ">
264
+ <span class="summary_signature">
265
+
266
+ <a href="#newline_maybe-instance_method" title="#newline_maybe (instance method)">- (Object) <strong>newline_maybe</strong>(word) </a>
267
+
268
+
269
+
270
+ </span>
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+
279
+
280
+ <span class="summary_desc"><div class='inline'></div></span>
281
+
282
+ </li>
283
+
284
+
285
+ <li class="public ">
286
+ <span class="summary_signature">
287
+
288
+ <a href="#print_advice-instance_method" title="#print_advice (instance method)">- (Object) <strong>print_advice</strong>(name) </a>
289
+
290
+
291
+
292
+ </span>
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+ <span class="summary_desc"><div class='inline'></div></span>
303
+
304
+ </li>
305
+
306
+
307
+ <li class="public ">
308
+ <span class="summary_signature">
309
+
310
+ <a href="#print_blue-instance_method" title="#print_blue (instance method)">- (Object) <strong>print_blue</strong>(word) </a>
311
+
312
+
313
+
314
+ </span>
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+ <span class="summary_desc"><div class='inline'></div></span>
325
+
326
+ </li>
327
+
328
+
329
+ <li class="public ">
330
+ <span class="summary_signature">
331
+
332
+ <a href="#print_fail-instance_method" title="#print_fail (instance method)">- (Object) <strong>print_fail</strong>(word, attempt) </a>
333
+
334
+
335
+
336
+ </span>
337
+
338
+
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+ <span class="summary_desc"><div class='inline'></div></span>
347
+
348
+ </li>
349
+
350
+
351
+ <li class="public ">
352
+ <span class="summary_signature">
353
+
354
+ <a href="#print_green-instance_method" title="#print_green (instance method)">- (Object) <strong>print_green</strong>(word) </a>
355
+
356
+
357
+
358
+ </span>
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+
368
+ <span class="summary_desc"><div class='inline'></div></span>
369
+
370
+ </li>
371
+
372
+
373
+ <li class="public ">
374
+ <span class="summary_signature">
375
+
376
+ <a href="#print_red-instance_method" title="#print_red (instance method)">- (Object) <strong>print_red</strong>(word) </a>
377
+
378
+
379
+
380
+ </span>
381
+
382
+
383
+
384
+
385
+
386
+
387
+
388
+
389
+
390
+ <span class="summary_desc"><div class='inline'></div></span>
391
+
392
+ </li>
393
+
394
+
395
+ <li class="public ">
396
+ <span class="summary_signature">
397
+
398
+ <a href="#prn-instance_method" title="#prn (instance method)">- (Object) <strong>prn</strong>(word) </a>
399
+
400
+
401
+
402
+ </span>
403
+
404
+
405
+
406
+
407
+
408
+
409
+
410
+
411
+
412
+ <span class="summary_desc"><div class='inline'></div></span>
413
+
414
+ </li>
415
+
416
+
417
+ <li class="public ">
418
+ <span class="summary_signature">
419
+
420
+ <a href="#prn_red-instance_method" title="#prn_red (instance method)">- (Object) <strong>prn_red</strong>(word) </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="#reset-instance_method" title="#reset (instance method)">- (Object) <strong>reset</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="#results-instance_method" title="#results (instance method)">- (Object) <strong>results</strong>(popped, type = :pass_and_fail) </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="#update_console_size-instance_method" title="#update_console_size (instance method)">- (Object) <strong>update_console_size</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
+ </ul>
506
+
507
+
508
+ <div id="constructor_details" class="method_details_list">
509
+ <h2>Constructor Details</h2>
510
+
511
+ <div class="method_details first">
512
+ <h3 class="signature first" id="initialize-instance_method">
513
+
514
+ - (<tt><span class='object_link'><a href="" title="Print (class)">Print</a></span></tt>) <strong>initialize</strong>
515
+
516
+
517
+
518
+
519
+
520
+ </h3><div class="docstring">
521
+ <div class="discussion">
522
+
523
+ <p>Returns a new instance of Print</p>
524
+
525
+
526
+ </div>
527
+ </div>
528
+ <div class="tags">
529
+
530
+
531
+ </div><table class="source_code">
532
+ <tr>
533
+ <td>
534
+ <pre class="lines">
535
+
536
+
537
+ 29
538
+ 30
539
+ 31
540
+ 32</pre>
541
+ </td>
542
+ <td>
543
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 29</span>
544
+
545
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
546
+ <span class='id identifier rubyid_update_console_size'>update_console_size</span>
547
+ <span class='id identifier rubyid_reset'>reset</span>
548
+ <span class='kw'>end</span></pre>
549
+ </td>
550
+ </tr>
551
+ </table>
552
+ </div>
553
+
554
+ </div>
555
+
556
+
557
+ <div id="instance_method_details" class="method_details_list">
558
+ <h2>Instance Method Details</h2>
559
+
560
+
561
+ <div class="method_details first">
562
+ <h3 class="signature first" id="char_result-instance_method">
563
+
564
+ - (<tt>Object</tt>) <strong>char_result</strong>(popped)
565
+
566
+
567
+
568
+
569
+
570
+ </h3><table class="source_code">
571
+ <tr>
572
+ <td>
573
+ <pre class="lines">
574
+
575
+
576
+ 84
577
+ 85
578
+ 86
579
+ 87
580
+ 88
581
+ 89
582
+ 90
583
+ 91
584
+ 92
585
+ 93
586
+ 94
587
+ 95
588
+ 96
589
+ 97</pre>
590
+ </td>
591
+ <td>
592
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 84</span>
593
+
594
+ <span class='kw'>def</span> <span class='id identifier rubyid_char_result'>char_result</span> <span class='id identifier rubyid_popped'>popped</span>
595
+ <span class='kw'>if</span> <span class='id identifier rubyid_popped'>popped</span>
596
+ <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_popped'>popped</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span>
597
+ <span class='id identifier rubyid_success'>success</span> <span class='op'>=</span> <span class='id identifier rubyid_popped'>popped</span><span class='lbracket'>[</span><span class='symbol'>:success</span><span class='rbracket'>]</span>
598
+
599
+ <span class='kw'>unless</span> <span class='id identifier rubyid_newline_maybe'>newline_maybe</span> <span class='id identifier rubyid_value'>value</span>
600
+ <span class='comment'>#return if @print_count == 0 &amp;&amp; value == &#39; &#39;
601
+ </span> <span class='id identifier rubyid_value'>value</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='kw'>if</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</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='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='id identifier rubyid_success'>success</span> <span class='op'>!=</span> <span class='kw'>true</span><span class='rparen'>)</span><span class='rparen'>)</span>
602
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>Paint</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:blue</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_success'>success</span>
603
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>Paint</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:red</span> <span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='id identifier rubyid_success'>success</span>
604
+ <span class='kw'>return</span> <span class='kw'>true</span>
605
+ <span class='kw'>end</span>
606
+ <span class='kw'>end</span>
607
+ <span class='kw'>end</span></pre>
608
+ </td>
609
+ </tr>
610
+ </table>
611
+ </div>
612
+
613
+ <div class="method_details ">
614
+ <h3 class="signature " id="console_size-instance_method">
615
+
616
+ - (<tt>Object</tt>) <strong>console_size</strong>
617
+
618
+
619
+
620
+
621
+
622
+ </h3><table class="source_code">
623
+ <tr>
624
+ <td>
625
+ <pre class="lines">
626
+
627
+
628
+ 34
629
+ 35
630
+ 36
631
+ 37
632
+ 38</pre>
633
+ </td>
634
+ <td>
635
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 34</span>
636
+
637
+ <span class='kw'>def</span> <span class='id identifier rubyid_console_size'>console_size</span>
638
+ <span class='const'>IO</span><span class='period'>.</span><span class='id identifier rubyid_console'>console</span><span class='period'>.</span><span class='id identifier rubyid_winsize'>winsize</span>
639
+ <span class='kw'>rescue</span> <span class='const'>LoadError</span>
640
+ <span class='lbracket'>[</span><span class='const'>Integer</span><span class='lparen'>(</span><span class='backtick'>`</span><span class='tstring_content'>tput li</span><span class='tstring_end'>`</span></span><span class='rparen'>)</span><span class='comma'>,</span> <span class='const'>Integer</span><span class='lparen'>(</span><span class='backtick'>`</span><span class='tstring_content'>tput co</span><span class='tstring_end'>`</span></span><span class='rparen'>)</span><span class='rbracket'>]</span>
641
+ <span class='kw'>end</span></pre>
642
+ </td>
643
+ </tr>
644
+ </table>
645
+ </div>
646
+
647
+ <div class="method_details ">
648
+ <h3 class="signature " id="force_newline_maybe-instance_method">
649
+
650
+ - (<tt>Object</tt>) <strong>force_newline_maybe</strong>
651
+
652
+
653
+
654
+
655
+
656
+ </h3><table class="source_code">
657
+ <tr>
658
+ <td>
659
+ <pre class="lines">
660
+
661
+
662
+ 55
663
+ 56
664
+ 57
665
+ 58
666
+ 59
667
+ 60</pre>
668
+ </td>
669
+ <td>
670
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 55</span>
671
+
672
+ <span class='kw'>def</span> <span class='id identifier rubyid_force_newline_maybe'>force_newline_maybe</span>
673
+ <span class='kw'>if</span> <span class='ivar'>@print_count</span> <span class='op'>&gt;=</span> <span class='lparen'>(</span><span class='ivar'>@cols</span> <span class='op'>-</span> <span class='int'>1</span><span class='rparen'>)</span>
674
+ <span class='id identifier rubyid_newline'>newline</span>
675
+ <span class='kw'>true</span>
676
+ <span class='kw'>end</span>
677
+ <span class='kw'>end</span></pre>
678
+ </td>
679
+ </tr>
680
+ </table>
681
+ </div>
682
+
683
+ <div class="method_details ">
684
+ <h3 class="signature " id="heading-instance_method">
685
+
686
+ - (<tt>Object</tt>) <strong>heading</strong>
687
+
688
+
689
+
690
+
691
+
692
+ </h3><table class="source_code">
693
+ <tr>
694
+ <td>
695
+ <pre class="lines">
696
+
697
+
698
+ 99
699
+ 100
700
+ 101</pre>
701
+ </td>
702
+ <td>
703
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 99</span>
704
+
705
+ <span class='kw'>def</span> <span class='id identifier rubyid_heading'>heading</span>
706
+ <span class='id identifier rubyid_puts'>puts</span> <span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>*</span><span class='tstring_end'>&quot;</span></span> <span class='op'>*</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Current Sentence is duration: secs</span><span class='tstring_end'>&quot;</span></span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\r</span><span class='tstring_end'>&quot;</span></span>
707
+ <span class='kw'>end</span></pre>
708
+ </td>
709
+ </tr>
710
+ </table>
711
+ </div>
712
+
713
+ <div class="method_details ">
714
+ <h3 class="signature " id="newline-instance_method">
715
+
716
+ - (<tt>Object</tt>) <strong>newline</strong>
717
+
718
+
719
+
720
+
721
+
722
+ </h3><table class="source_code">
723
+ <tr>
724
+ <td>
725
+ <pre class="lines">
726
+
727
+
728
+ 50
729
+ 51
730
+ 52
731
+ 53</pre>
732
+ </td>
733
+ <td>
734
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 50</span>
735
+
736
+ <span class='kw'>def</span> <span class='id identifier rubyid_newline'>newline</span>
737
+ <span class='id identifier rubyid_reset'>reset</span>
738
+ <span class='id identifier rubyid_update_console_size'>update_console_size</span>
739
+ <span class='kw'>end</span></pre>
740
+ </td>
741
+ </tr>
742
+ </table>
743
+ </div>
744
+
745
+ <div class="method_details ">
746
+ <h3 class="signature " id="newline_maybe-instance_method">
747
+
748
+ - (<tt>Object</tt>) <strong>newline_maybe</strong>(word)
749
+
750
+
751
+
752
+
753
+
754
+ </h3><table class="source_code">
755
+ <tr>
756
+ <td>
757
+ <pre class="lines">
758
+
759
+
760
+ 62
761
+ 63
762
+ 64
763
+ 65
764
+ 66
765
+ 67
766
+ 68
767
+ 69</pre>
768
+ </td>
769
+ <td>
770
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 62</span>
771
+
772
+ <span class='kw'>def</span> <span class='id identifier rubyid_newline_maybe'>newline_maybe</span> <span class='id identifier rubyid_word'>word</span>
773
+ <span class='ivar'>@print_count</span> <span class='op'>+=</span> <span class='id identifier rubyid_word'>word</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='kw'>unless</span> <span class='id identifier rubyid_force_newline_maybe'>force_newline_maybe</span>
774
+ <span class='kw'>return</span> <span class='kw'>if</span><span class='lparen'>(</span><span class='lparen'>(</span><span class='id identifier rubyid_word'>word</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='id identifier rubyid_word'>word</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='rparen'>)</span><span class='rparen'>)</span>
775
+ <span class='kw'>if</span> <span class='ivar'>@print_count</span> <span class='op'>&gt;</span> <span class='lparen'>(</span><span class='ivar'>@cols</span> <span class='op'>-</span> <span class='int'>10</span><span class='rparen'>)</span>
776
+ <span class='id identifier rubyid_newline'>newline</span>
777
+ <span class='kw'>true</span>
778
+ <span class='kw'>end</span>
779
+ <span class='kw'>end</span></pre>
780
+ </td>
781
+ </tr>
782
+ </table>
783
+ </div>
784
+
785
+ <div class="method_details ">
786
+ <h3 class="signature " id="print_advice-instance_method">
787
+
788
+ - (<tt>Object</tt>) <strong>print_advice</strong>(name)
789
+
790
+
791
+
792
+
793
+
794
+ </h3><table class="source_code">
795
+ <tr>
796
+ <td>
797
+ <pre class="lines">
798
+
799
+
800
+ 133
801
+ 134
802
+ 135</pre>
803
+ </td>
804
+ <td>
805
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 133</span>
806
+
807
+ <span class='kw'>def</span> <span class='id identifier rubyid_print_advice'>print_advice</span> <span class='id identifier rubyid_name'>name</span>
808
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='embexpr_end'>}</span><span class='tstring_content'>: Press Q 4 times to Exit</span><span class='tstring_end'>&quot;</span></span>
809
+ <span class='kw'>end</span></pre>
810
+ </td>
811
+ </tr>
812
+ </table>
813
+ </div>
814
+
815
+ <div class="method_details ">
816
+ <h3 class="signature " id="print_blue-instance_method">
817
+
818
+ - (<tt>Object</tt>) <strong>print_blue</strong>(word)
819
+
820
+
821
+
822
+
823
+
824
+ </h3><table class="source_code">
825
+ <tr>
826
+ <td>
827
+ <pre class="lines">
828
+
829
+
830
+ 103
831
+ 104
832
+ 105
833
+ 106
834
+ 107</pre>
835
+ </td>
836
+ <td>
837
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 103</span>
838
+
839
+ <span class='kw'>def</span> <span class='id identifier rubyid_print_blue'>print_blue</span><span class='lparen'>(</span><span class='id identifier rubyid_word'>word</span><span class='rparen'>)</span>
840
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>Paint</span><span class='lbracket'>[</span><span class='id identifier rubyid_word'>word</span><span class='comma'>,</span> <span class='symbol'>:blue</span><span class='rbracket'>]</span>
841
+ <span class='id identifier rubyid_cursor_pos'>cursor_pos</span> <span class='op'>=</span> <span class='id identifier rubyid_word'>word</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span>
842
+ <span class='lparen'>(</span><span class='int'>12</span> <span class='op'>-</span> <span class='id identifier rubyid_cursor_pos'>cursor_pos</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span><span class='lbrace'>{</span><span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'> </span><span class='tstring_end'>&#39;</span></span><span class='rbrace'>}</span>
843
+ <span class='kw'>end</span></pre>
844
+ </td>
845
+ </tr>
846
+ </table>
847
+ </div>
848
+
849
+ <div class="method_details ">
850
+ <h3 class="signature " id="print_fail-instance_method">
851
+
852
+ - (<tt>Object</tt>) <strong>print_fail</strong>(word, attempt)
853
+
854
+
855
+
856
+
857
+
858
+ </h3><table class="source_code">
859
+ <tr>
860
+ <td>
861
+ <pre class="lines">
862
+
863
+
864
+ 122
865
+ 123
866
+ 124
867
+ 125</pre>
868
+ </td>
869
+ <td>
870
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 122</span>
871
+
872
+ <span class='kw'>def</span> <span class='id identifier rubyid_print_fail'>print_fail</span><span class='lparen'>(</span><span class='id identifier rubyid_word'>word</span><span class='comma'>,</span> <span class='id identifier rubyid_attempt'>attempt</span><span class='rparen'>)</span>
873
+ <span class='id identifier rubyid_print_blue'>print_blue</span><span class='lparen'>(</span><span class='id identifier rubyid_word'>word</span><span class='rparen'>)</span>
874
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>Paint</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_attempt'>attempt</span> <span class='embexpr_end'>}</span><span class='tstring_content'>\r\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:red</span><span class='rbracket'>]</span>
875
+ <span class='kw'>end</span></pre>
876
+ </td>
877
+ </tr>
878
+ </table>
879
+ </div>
880
+
881
+ <div class="method_details ">
882
+ <h3 class="signature " id="print_green-instance_method">
883
+
884
+ - (<tt>Object</tt>) <strong>print_green</strong>(word)
885
+
886
+
887
+
888
+
889
+
890
+ </h3><table class="source_code">
891
+ <tr>
892
+ <td>
893
+ <pre class="lines">
894
+
895
+
896
+ 109
897
+ 110
898
+ 111
899
+ 112</pre>
900
+ </td>
901
+ <td>
902
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 109</span>
903
+
904
+ <span class='kw'>def</span> <span class='id identifier rubyid_print_green'>print_green</span><span class='lparen'>(</span><span class='id identifier rubyid_word'>word</span><span class='rparen'>)</span>
905
+ <span class='id identifier rubyid_print_blue'>print_blue</span><span class='lparen'>(</span><span class='id identifier rubyid_word'>word</span><span class='rparen'>)</span>
906
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>Paint</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_word'>word</span><span class='embexpr_end'>}</span><span class='tstring_content'> \r\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:green</span><span class='rbracket'>]</span>
907
+ <span class='kw'>end</span></pre>
908
+ </td>
909
+ </tr>
910
+ </table>
911
+ </div>
912
+
913
+ <div class="method_details ">
914
+ <h3 class="signature " id="print_red-instance_method">
915
+
916
+ - (<tt>Object</tt>) <strong>print_red</strong>(word)
917
+
918
+
919
+
920
+
921
+
922
+ </h3><table class="source_code">
923
+ <tr>
924
+ <td>
925
+ <pre class="lines">
926
+
927
+
928
+ 114
929
+ 115
930
+ 116</pre>
931
+ </td>
932
+ <td>
933
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 114</span>
934
+
935
+ <span class='kw'>def</span> <span class='id identifier rubyid_print_red'>print_red</span> <span class='id identifier rubyid_word'>word</span>
936
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>Paint</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_word'>word</span> <span class='embexpr_end'>}</span><span class='tstring_content'>\r\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:red</span><span class='rbracket'>]</span>
937
+ <span class='kw'>end</span></pre>
938
+ </td>
939
+ </tr>
940
+ </table>
941
+ </div>
942
+
943
+ <div class="method_details ">
944
+ <h3 class="signature " id="prn-instance_method">
945
+
946
+ - (<tt>Object</tt>) <strong>prn</strong>(word)
947
+
948
+
949
+
950
+
951
+
952
+ </h3><table class="source_code">
953
+ <tr>
954
+ <td>
955
+ <pre class="lines">
956
+
957
+
958
+ 127
959
+ 128
960
+ 129
961
+ 130
962
+ 131</pre>
963
+ </td>
964
+ <td>
965
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 127</span>
966
+
967
+ <span class='kw'>def</span> <span class='id identifier rubyid_prn'>prn</span><span class='lparen'>(</span><span class='id identifier rubyid_word'>word</span><span class='rparen'>)</span>
968
+ <span class='id identifier rubyid_newline_maybe'>newline_maybe</span> <span class='id identifier rubyid_word'>word</span>
969
+ <span class='kw'>return</span> <span class='kw'>if</span><span class='lparen'>(</span><span class='ivar'>@print_count</span> <span class='op'>==</span> <span class='int'>0</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_word'>word</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='rparen'>)</span>
970
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>Paint</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_word'>word</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:blue</span><span class='rbracket'>]</span>
971
+ <span class='kw'>end</span></pre>
972
+ </td>
973
+ </tr>
974
+ </table>
975
+ </div>
976
+
977
+ <div class="method_details ">
978
+ <h3 class="signature " id="prn_red-instance_method">
979
+
980
+ - (<tt>Object</tt>) <strong>prn_red</strong>(word)
981
+
982
+
983
+
984
+
985
+
986
+ </h3><table class="source_code">
987
+ <tr>
988
+ <td>
989
+ <pre class="lines">
990
+
991
+
992
+ 118
993
+ 119
994
+ 120</pre>
995
+ </td>
996
+ <td>
997
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 118</span>
998
+
999
+ <span class='kw'>def</span> <span class='id identifier rubyid_prn_red'>prn_red</span> <span class='id identifier rubyid_word'>word</span>
1000
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>Paint</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_word'>word</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:red</span><span class='rbracket'>]</span>
1001
+ <span class='kw'>end</span></pre>
1002
+ </td>
1003
+ </tr>
1004
+ </table>
1005
+ </div>
1006
+
1007
+ <div class="method_details ">
1008
+ <h3 class="signature " id="reset-instance_method">
1009
+
1010
+ - (<tt>Object</tt>) <strong>reset</strong>
1011
+
1012
+
1013
+
1014
+
1015
+
1016
+ </h3><table class="source_code">
1017
+ <tr>
1018
+ <td>
1019
+ <pre class="lines">
1020
+
1021
+
1022
+ 45
1023
+ 46
1024
+ 47
1025
+ 48</pre>
1026
+ </td>
1027
+ <td>
1028
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 45</span>
1029
+
1030
+ <span class='kw'>def</span> <span class='id identifier rubyid_reset'>reset</span>
1031
+ <span class='ivar'>@print_count</span> <span class='op'>=</span> <span class='int'>0</span>
1032
+ <span class='id identifier rubyid_puts'>puts</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>\r</span><span class='tstring_end'>&quot;</span></span>
1033
+ <span class='kw'>end</span></pre>
1034
+ </td>
1035
+ </tr>
1036
+ </table>
1037
+ </div>
1038
+
1039
+ <div class="method_details ">
1040
+ <h3 class="signature " id="results-instance_method">
1041
+
1042
+ - (<tt>Object</tt>) <strong>results</strong>(popped, type = :pass_and_fail)
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+ </h3><table class="source_code">
1049
+ <tr>
1050
+ <td>
1051
+ <pre class="lines">
1052
+
1053
+
1054
+ 71
1055
+ 72
1056
+ 73
1057
+ 74
1058
+ 75
1059
+ 76
1060
+ 77
1061
+ 78
1062
+ 79
1063
+ 80
1064
+ 81
1065
+ 82</pre>
1066
+ </td>
1067
+ <td>
1068
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 71</span>
1069
+
1070
+ <span class='kw'>def</span> <span class='id identifier rubyid_results'>results</span> <span class='id identifier rubyid_popped'>popped</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='symbol'>:pass_and_fail</span>
1071
+ <span class='kw'>if</span> <span class='id identifier rubyid_popped'>popped</span>
1072
+ <span class='id identifier rubyid_value'>value</span> <span class='op'>=</span> <span class='id identifier rubyid_popped'>popped</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span>
1073
+ <span class='id identifier rubyid_success'>success</span> <span class='op'>=</span> <span class='id identifier rubyid_popped'>popped</span><span class='lbracket'>[</span><span class='symbol'>:success</span><span class='rbracket'>]</span>
1074
+
1075
+ <span class='id identifier rubyid_newline_maybe'>newline_maybe</span> <span class='id identifier rubyid_value'>value</span>
1076
+
1077
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>Paint</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:blue</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_success'>success</span>
1078
+ <span class='id identifier rubyid_print'>print</span> <span class='const'>Paint</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_content'> </span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='symbol'>:red</span> <span class='rbracket'>]</span> <span class='kw'>unless</span> <span class='lparen'>(</span><span class='id identifier rubyid_success'>success</span> <span class='op'>||</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='symbol'>:pass_only</span><span class='rparen'>)</span>
1079
+ <span class='kw'>return</span> <span class='kw'>true</span>
1080
+ <span class='kw'>end</span>
1081
+ <span class='kw'>end</span></pre>
1082
+ </td>
1083
+ </tr>
1084
+ </table>
1085
+ </div>
1086
+
1087
+ <div class="method_details ">
1088
+ <h3 class="signature " id="update_console_size-instance_method">
1089
+
1090
+ - (<tt>Object</tt>) <strong>update_console_size</strong>
1091
+
1092
+
1093
+
1094
+
1095
+
1096
+ </h3><table class="source_code">
1097
+ <tr>
1098
+ <td>
1099
+ <pre class="lines">
1100
+
1101
+
1102
+ 40
1103
+ 41
1104
+ 42
1105
+ 43</pre>
1106
+ </td>
1107
+ <td>
1108
+ <pre class="code"><span class="info file"># File 'lib/cw/print.rb', line 40</span>
1109
+
1110
+ <span class='kw'>def</span> <span class='id identifier rubyid_update_console_size'>update_console_size</span>
1111
+ <span class='ivar'>@rows</span><span class='comma'>,</span> <span class='ivar'>@cols</span> <span class='op'>=</span> <span class='id identifier rubyid_console_size'>console_size</span>
1112
+ <span class='comment'># printf &quot;%d rows by %d columns\n&quot;, @rows, @cols
1113
+ </span><span class='kw'>end</span></pre>
1114
+ </td>
1115
+ </tr>
1116
+ </table>
1117
+ </div>
1118
+
1119
+ </div>
1120
+
1121
+ </div>
1122
+
1123
+ <div id="footer">
1124
+ Generated on Mon May 23 21:20:16 2016 by
1125
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1126
+ 0.8.7.6 (ruby-2.2.0).
1127
+ </div>
1128
+
1129
+ </body>
1130
+ </html>