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/CWThreads.html
ADDED
@@ -0,0 +1,514 @@
|
|
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: CWThreads
|
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#!CWThreads.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">CWThreads</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: CWThreads
|
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">CWThreads</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_threads.rb</dd>
|
98
|
+
|
99
|
+
</dl>
|
100
|
+
<div class="clear"></div>
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
107
|
+
<ul class="summary">
|
108
|
+
|
109
|
+
<li class="public ">
|
110
|
+
<span class="summary_signature">
|
111
|
+
|
112
|
+
<a href="#threads-instance_method" title="#threads (instance method)">- (Object) <strong>threads</strong> </a>
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
</span>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
<span class="summary_desc"><div class='inline'>
|
130
|
+
<p>Returns the value of attribute threads.</p>
|
131
|
+
</div></span>
|
132
|
+
|
133
|
+
</li>
|
134
|
+
|
135
|
+
|
136
|
+
</ul>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<h2>
|
143
|
+
Instance Method Summary
|
144
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
145
|
+
</h2>
|
146
|
+
|
147
|
+
<ul class="summary">
|
148
|
+
|
149
|
+
<li class="public ">
|
150
|
+
<span class="summary_signature">
|
151
|
+
|
152
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (CWThreads) <strong>initialize</strong>(context, processes) </a>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
</span>
|
157
|
+
|
158
|
+
|
159
|
+
<span class="note title constructor">constructor</span>
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
<span class="summary_desc"><div class='inline'>
|
169
|
+
<p>A new instance of CWThreads.</p>
|
170
|
+
</div></span>
|
171
|
+
|
172
|
+
</li>
|
173
|
+
|
174
|
+
|
175
|
+
<li class="public ">
|
176
|
+
<span class="summary_signature">
|
177
|
+
|
178
|
+
<a href="#kill-instance_method" title="#kill (instance method)">- (Object) <strong>kill</strong> </a>
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
</span>
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
193
|
+
|
194
|
+
</li>
|
195
|
+
|
196
|
+
|
197
|
+
<li class="public ">
|
198
|
+
<span class="summary_signature">
|
199
|
+
|
200
|
+
<a href="#run-instance_method" title="#run (instance method)">- (Object) <strong>run</strong> </a>
|
201
|
+
|
202
|
+
|
203
|
+
|
204
|
+
</span>
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
215
|
+
|
216
|
+
</li>
|
217
|
+
|
218
|
+
|
219
|
+
<li class="public ">
|
220
|
+
<span class="summary_signature">
|
221
|
+
|
222
|
+
<a href="#start_threads-instance_method" title="#start_threads (instance method)">- (Object) <strong>start_threads</strong> </a>
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
</span>
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
237
|
+
|
238
|
+
</li>
|
239
|
+
|
240
|
+
|
241
|
+
<li class="public ">
|
242
|
+
<span class="summary_signature">
|
243
|
+
|
244
|
+
<a href="#wait_for_threads-instance_method" title="#wait_for_threads (instance method)">- (Object) <strong>wait_for_threads</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
|
+
</ul>
|
264
|
+
|
265
|
+
|
266
|
+
<div id="constructor_details" class="method_details_list">
|
267
|
+
<h2>Constructor Details</h2>
|
268
|
+
|
269
|
+
<div class="method_details first">
|
270
|
+
<h3 class="signature first" id="initialize-instance_method">
|
271
|
+
|
272
|
+
- (<tt><span class='object_link'><a href="" title="CWThreads (class)">CWThreads</a></span></tt>) <strong>initialize</strong>(context, processes)
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
</h3><div class="docstring">
|
279
|
+
<div class="discussion">
|
280
|
+
|
281
|
+
<p>Returns a new instance of CWThreads</p>
|
282
|
+
|
283
|
+
|
284
|
+
</div>
|
285
|
+
</div>
|
286
|
+
<div class="tags">
|
287
|
+
|
288
|
+
|
289
|
+
</div><table class="source_code">
|
290
|
+
<tr>
|
291
|
+
<td>
|
292
|
+
<pre class="lines">
|
293
|
+
|
294
|
+
|
295
|
+
7
|
296
|
+
8
|
297
|
+
9
|
298
|
+
10</pre>
|
299
|
+
</td>
|
300
|
+
<td>
|
301
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_threads.rb', line 7</span>
|
302
|
+
|
303
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span> <span class='id identifier rubyid_context'>context</span><span class='comma'>,</span> <span class='id identifier rubyid_processes'>processes</span>
|
304
|
+
<span class='ivar'>@context</span> <span class='op'>=</span> <span class='id identifier rubyid_context'>context</span>
|
305
|
+
<span class='ivar'>@processes</span> <span class='op'>=</span> <span class='id identifier rubyid_processes'>processes</span>
|
306
|
+
<span class='kw'>end</span></pre>
|
307
|
+
</td>
|
308
|
+
</tr>
|
309
|
+
</table>
|
310
|
+
</div>
|
311
|
+
|
312
|
+
</div>
|
313
|
+
|
314
|
+
<div id="instance_attr_details" class="attr_details">
|
315
|
+
<h2>Instance Attribute Details</h2>
|
316
|
+
|
317
|
+
|
318
|
+
<span id="threads=-instance_method"></span>
|
319
|
+
<div class="method_details first">
|
320
|
+
<h3 class="signature first" id="threads-instance_method">
|
321
|
+
|
322
|
+
- (<tt>Object</tt>) <strong>threads</strong>
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
</h3><div class="docstring">
|
329
|
+
<div class="discussion">
|
330
|
+
|
331
|
+
<p>Returns the value of attribute threads</p>
|
332
|
+
|
333
|
+
|
334
|
+
</div>
|
335
|
+
</div>
|
336
|
+
<div class="tags">
|
337
|
+
|
338
|
+
|
339
|
+
</div><table class="source_code">
|
340
|
+
<tr>
|
341
|
+
<td>
|
342
|
+
<pre class="lines">
|
343
|
+
|
344
|
+
|
345
|
+
5
|
346
|
+
6
|
347
|
+
7</pre>
|
348
|
+
</td>
|
349
|
+
<td>
|
350
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_threads.rb', line 5</span>
|
351
|
+
|
352
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_threads'>threads</span>
|
353
|
+
<span class='ivar'>@threads</span>
|
354
|
+
<span class='kw'>end</span></pre>
|
355
|
+
</td>
|
356
|
+
</tr>
|
357
|
+
</table>
|
358
|
+
</div>
|
359
|
+
|
360
|
+
</div>
|
361
|
+
|
362
|
+
|
363
|
+
<div id="instance_method_details" class="method_details_list">
|
364
|
+
<h2>Instance Method Details</h2>
|
365
|
+
|
366
|
+
|
367
|
+
<div class="method_details first">
|
368
|
+
<h3 class="signature first" id="kill-instance_method">
|
369
|
+
|
370
|
+
- (<tt>Object</tt>) <strong>kill</strong>
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
</h3><table class="source_code">
|
377
|
+
<tr>
|
378
|
+
<td>
|
379
|
+
<pre class="lines">
|
380
|
+
|
381
|
+
|
382
|
+
12
|
383
|
+
13
|
384
|
+
14
|
385
|
+
15
|
386
|
+
16
|
387
|
+
17
|
388
|
+
18
|
389
|
+
19</pre>
|
390
|
+
</td>
|
391
|
+
<td>
|
392
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_threads.rb', line 12</span>
|
393
|
+
|
394
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_kill'>kill</span>
|
395
|
+
<span class='id identifier rubyid_sleep'>sleep</span> <span class='float'>0.2</span>
|
396
|
+
<span class='kw'>if</span> <span class='ivar'>@threads</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>Array</span><span class='rparen'>)</span>
|
397
|
+
<span class='ivar'>@threads</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_th'>th</span><span class='op'>|</span>
|
398
|
+
<span class='id identifier rubyid_th'>th</span><span class='period'>.</span><span class='id identifier rubyid_exit'>exit</span> <span class='kw'>if</span> <span class='id identifier rubyid_th'>th</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span> <span class='const'>Thread</span>
|
399
|
+
<span class='kw'>end</span>
|
400
|
+
<span class='kw'>end</span>
|
401
|
+
<span class='kw'>end</span></pre>
|
402
|
+
</td>
|
403
|
+
</tr>
|
404
|
+
</table>
|
405
|
+
</div>
|
406
|
+
|
407
|
+
<div class="method_details ">
|
408
|
+
<h3 class="signature " id="run-instance_method">
|
409
|
+
|
410
|
+
- (<tt>Object</tt>) <strong>run</strong>
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
</h3><table class="source_code">
|
417
|
+
<tr>
|
418
|
+
<td>
|
419
|
+
<pre class="lines">
|
420
|
+
|
421
|
+
|
422
|
+
31
|
423
|
+
32
|
424
|
+
33
|
425
|
+
34</pre>
|
426
|
+
</td>
|
427
|
+
<td>
|
428
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_threads.rb', line 31</span>
|
429
|
+
|
430
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_run'>run</span>
|
431
|
+
<span class='id identifier rubyid_start_threads'>start_threads</span>
|
432
|
+
<span class='id identifier rubyid_wait_for_threads'>wait_for_threads</span>
|
433
|
+
<span class='kw'>end</span></pre>
|
434
|
+
</td>
|
435
|
+
</tr>
|
436
|
+
</table>
|
437
|
+
</div>
|
438
|
+
|
439
|
+
<div class="method_details ">
|
440
|
+
<h3 class="signature " id="start_threads-instance_method">
|
441
|
+
|
442
|
+
- (<tt>Object</tt>) <strong>start_threads</strong>
|
443
|
+
|
444
|
+
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
</h3><table class="source_code">
|
449
|
+
<tr>
|
450
|
+
<td>
|
451
|
+
<pre class="lines">
|
452
|
+
|
453
|
+
|
454
|
+
21
|
455
|
+
22
|
456
|
+
23
|
457
|
+
24
|
458
|
+
25</pre>
|
459
|
+
</td>
|
460
|
+
<td>
|
461
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_threads.rb', line 21</span>
|
462
|
+
|
463
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_start_threads'>start_threads</span>
|
464
|
+
<span class='ivar'>@threads</span> <span class='op'>=</span> <span class='ivar'>@processes</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_th'>th</span><span class='op'>|</span>
|
465
|
+
<span class='const'>Thread</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lbrace'>{</span><span class='ivar'>@context</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span> <span class='id identifier rubyid_th'>th</span><span class='rbrace'>}</span>
|
466
|
+
<span class='kw'>end</span>
|
467
|
+
<span class='kw'>end</span></pre>
|
468
|
+
</td>
|
469
|
+
</tr>
|
470
|
+
</table>
|
471
|
+
</div>
|
472
|
+
|
473
|
+
<div class="method_details ">
|
474
|
+
<h3 class="signature " id="wait_for_threads-instance_method">
|
475
|
+
|
476
|
+
- (<tt>Object</tt>) <strong>wait_for_threads</strong>
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
</h3><table class="source_code">
|
483
|
+
<tr>
|
484
|
+
<td>
|
485
|
+
<pre class="lines">
|
486
|
+
|
487
|
+
|
488
|
+
27
|
489
|
+
28
|
490
|
+
29</pre>
|
491
|
+
</td>
|
492
|
+
<td>
|
493
|
+
<pre class="code"><span class="info file"># File 'lib/cw/cw_threads.rb', line 27</span>
|
494
|
+
|
495
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_wait_for_threads'>wait_for_threads</span>
|
496
|
+
<span class='ivar'>@threads</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_th'>th</span><span class='op'>|</span> <span class='id identifier rubyid_th'>th</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span> <span class='rbrace'>}</span>
|
497
|
+
<span class='kw'>end</span></pre>
|
498
|
+
</td>
|
499
|
+
</tr>
|
500
|
+
</table>
|
501
|
+
</div>
|
502
|
+
|
503
|
+
</div>
|
504
|
+
|
505
|
+
</div>
|
506
|
+
|
507
|
+
<div id="footer">
|
508
|
+
Generated on Mon May 23 21:20:17 2016 by
|
509
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
510
|
+
0.8.7.6 (ruby-2.2.0).
|
511
|
+
</div>
|
512
|
+
|
513
|
+
</body>
|
514
|
+
</html>
|