tiny_conveyor 0.0.1
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 +7 -0
- data/.gitignore +10 -0
- data/.rspec +1 -0
- data/Gemfile +6 -0
- data/README.md +54 -0
- data/doc/TinyConveyor.html +774 -0
- data/doc/TinyConveyor/Belt.html +747 -0
- data/doc/TinyConveyor/Parcel.html +715 -0
- data/doc/_index.html +137 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +497 -0
- data/doc/file.README.html +123 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +123 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +219 -0
- data/doc/top-level-namespace.html +110 -0
- data/icon.png +0 -0
- data/icon.svg +121 -0
- data/lib/tiny_conveyor.rb +49 -0
- data/lib/tiny_conveyor/belt.rb +70 -0
- data/lib/tiny_conveyor/parcel.rb +31 -0
- data/tiny_conveyor.gemspec +23 -0
- metadata +117 -0
@@ -0,0 +1,747 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6
|
+
<title>
|
7
|
+
Class: TinyConveyor::Belt
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.26
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "TinyConveyor::Belt";
|
19
|
+
relpath = '../';
|
20
|
+
</script>
|
21
|
+
|
22
|
+
|
23
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
24
|
+
|
25
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
26
|
+
|
27
|
+
|
28
|
+
</head>
|
29
|
+
<body>
|
30
|
+
<div class="nav_wrap">
|
31
|
+
<iframe id="nav" src="../class_list.html?1"></iframe>
|
32
|
+
<div id="resizer"></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="main" tabindex="-1">
|
36
|
+
<div id="header">
|
37
|
+
<div id="menu">
|
38
|
+
|
39
|
+
<a href="../_index.html">Index (B)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../TinyConveyor.html" title="TinyConveyor (module)">TinyConveyor</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Belt</span>
|
43
|
+
|
44
|
+
</div>
|
45
|
+
|
46
|
+
<div id="search">
|
47
|
+
|
48
|
+
<a class="full_list_link" id="class_list_link"
|
49
|
+
href="../class_list.html">
|
50
|
+
|
51
|
+
<svg width="24" height="24">
|
52
|
+
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
53
|
+
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
54
|
+
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
55
|
+
</svg>
|
56
|
+
</a>
|
57
|
+
|
58
|
+
</div>
|
59
|
+
<div class="clear"></div>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
<div id="content"><h1>Class: TinyConveyor::Belt
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
<dl>
|
70
|
+
<dt>Inherits:</dt>
|
71
|
+
<dd>
|
72
|
+
<span class="inheritName">Object</span>
|
73
|
+
|
74
|
+
<ul class="fullTree">
|
75
|
+
<li>Object</li>
|
76
|
+
|
77
|
+
<li class="next">TinyConveyor::Belt</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<dl>
|
91
|
+
<dt>Includes:</dt>
|
92
|
+
<dd>Concurrent::Async</dd>
|
93
|
+
</dl>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Defined in:</dt>
|
102
|
+
<dd>lib/tiny_conveyor/belt.rb</dd>
|
103
|
+
</dl>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<h2>Overview</h2><div class="docstring">
|
108
|
+
<div class="discussion">
|
109
|
+
|
110
|
+
<p>Thread manager, allow creation and execution of parcels</p>
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
114
|
+
</div>
|
115
|
+
<div class="tags">
|
116
|
+
|
117
|
+
|
118
|
+
</div>
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
123
|
+
<ul class="summary">
|
124
|
+
|
125
|
+
<li class="public ">
|
126
|
+
<span class="summary_signature">
|
127
|
+
|
128
|
+
<a href="#parcels-instance_method" title="#parcels (instance method)">#<strong>parcels</strong> ⇒ Object </a>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
</span>
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
<span class="note title readonly">readonly</span>
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
<span class="summary_desc"><div class='inline'>
|
148
|
+
<p>Returns the value of attribute parcels.</p>
|
149
|
+
</div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
</ul>
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
<h2>
|
161
|
+
Instance Method Summary
|
162
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
163
|
+
</h2>
|
164
|
+
|
165
|
+
<ul class="summary">
|
166
|
+
|
167
|
+
<li class="public ">
|
168
|
+
<span class="summary_signature">
|
169
|
+
|
170
|
+
<a href="#add_parcel-instance_method" title="#add_parcel (instance method)">#<strong>add_parcel</strong>(name, description, task) ⇒ Array<Parcel> </a>
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
</span>
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
<span class="summary_desc"><div class='inline'>
|
185
|
+
<p>Pending parcels.</p>
|
186
|
+
</div></span>
|
187
|
+
|
188
|
+
</li>
|
189
|
+
|
190
|
+
|
191
|
+
<li class="public ">
|
192
|
+
<span class="summary_signature">
|
193
|
+
|
194
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> ⇒ Belt </a>
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
</span>
|
199
|
+
|
200
|
+
|
201
|
+
<span class="note title constructor">constructor</span>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
<span class="summary_desc"><div class='inline'>
|
211
|
+
<p>Newly created belt.</p>
|
212
|
+
</div></span>
|
213
|
+
|
214
|
+
</li>
|
215
|
+
|
216
|
+
|
217
|
+
<li class="public ">
|
218
|
+
<span class="summary_signature">
|
219
|
+
|
220
|
+
<a href="#remove_parcel_by_uuid-instance_method" title="#remove_parcel_by_uuid (instance method)">#<strong>remove_parcel_by_uuid</strong>(uuid) ⇒ Array<Parcel> </a>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
</span>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
<span class="summary_desc"><div class='inline'>
|
235
|
+
<p>Pending parcels.</p>
|
236
|
+
</div></span>
|
237
|
+
|
238
|
+
</li>
|
239
|
+
|
240
|
+
|
241
|
+
<li class="public ">
|
242
|
+
<span class="summary_signature">
|
243
|
+
|
244
|
+
<a href="#run_belt_entirely-instance_method" title="#run_belt_entirely (instance method)">#<strong>run_belt_entirely</strong> ⇒ Object </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="#running%3F-instance_method" title="#running? (instance method)">#<strong>running?</strong> ⇒ boolean </a>
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
</span>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
<span class="summary_desc"><div class='inline'>
|
281
|
+
<p>True if the belt is running, false otherwhise.</p>
|
282
|
+
</div></span>
|
283
|
+
|
284
|
+
</li>
|
285
|
+
|
286
|
+
|
287
|
+
<li class="public ">
|
288
|
+
<span class="summary_signature">
|
289
|
+
|
290
|
+
<a href="#start_belt-instance_method" title="#start_belt (instance method)">#<strong>start_belt</strong> ⇒ Object </a>
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
</span>
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
305
|
+
|
306
|
+
</li>
|
307
|
+
|
308
|
+
|
309
|
+
</ul>
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
<div id="constructor_details" class="method_details_list">
|
314
|
+
<h2>Constructor Details</h2>
|
315
|
+
|
316
|
+
<div class="method_details first">
|
317
|
+
<h3 class="signature first" id="initialize-instance_method">
|
318
|
+
|
319
|
+
#<strong>initialize</strong> ⇒ <tt><span class='object_link'><a href="" title="TinyConveyor::Belt (class)">Belt</a></span></tt>
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
</h3><div class="docstring">
|
326
|
+
<div class="discussion">
|
327
|
+
|
328
|
+
<p>Returns newly created belt.</p>
|
329
|
+
|
330
|
+
|
331
|
+
</div>
|
332
|
+
</div>
|
333
|
+
<div class="tags">
|
334
|
+
|
335
|
+
|
336
|
+
</div><table class="source_code">
|
337
|
+
<tr>
|
338
|
+
<td>
|
339
|
+
<pre class="lines">
|
340
|
+
|
341
|
+
|
342
|
+
11
|
343
|
+
12
|
344
|
+
13
|
345
|
+
14
|
346
|
+
15
|
347
|
+
16</pre>
|
348
|
+
</td>
|
349
|
+
<td>
|
350
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor/belt.rb', line 11</span>
|
351
|
+
|
352
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
|
353
|
+
<span class='kw'>super</span><span class='lparen'>(</span><span class='rparen'>)</span>
|
354
|
+
<span class='ivar'>@parcels</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
355
|
+
<span class='ivar'>@threads</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
356
|
+
<span class='ivar'>@state</span> <span class='op'>=</span> <span class='symbol'>:waiting</span>
|
357
|
+
<span class='kw'>end</span></pre>
|
358
|
+
</td>
|
359
|
+
</tr>
|
360
|
+
</table>
|
361
|
+
</div>
|
362
|
+
|
363
|
+
</div>
|
364
|
+
|
365
|
+
<div id="instance_attr_details" class="attr_details">
|
366
|
+
<h2>Instance Attribute Details</h2>
|
367
|
+
|
368
|
+
|
369
|
+
<span id=""></span>
|
370
|
+
<div class="method_details first">
|
371
|
+
<h3 class="signature first" id="parcels-instance_method">
|
372
|
+
|
373
|
+
#<strong>parcels</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
|
378
|
+
|
379
|
+
</h3><div class="docstring">
|
380
|
+
<div class="discussion">
|
381
|
+
|
382
|
+
<p>Returns the value of attribute parcels.</p>
|
383
|
+
|
384
|
+
|
385
|
+
</div>
|
386
|
+
</div>
|
387
|
+
<div class="tags">
|
388
|
+
|
389
|
+
|
390
|
+
</div><table class="source_code">
|
391
|
+
<tr>
|
392
|
+
<td>
|
393
|
+
<pre class="lines">
|
394
|
+
|
395
|
+
|
396
|
+
8
|
397
|
+
9
|
398
|
+
10</pre>
|
399
|
+
</td>
|
400
|
+
<td>
|
401
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor/belt.rb', line 8</span>
|
402
|
+
|
403
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parcels'>parcels</span>
|
404
|
+
<span class='ivar'>@parcels</span>
|
405
|
+
<span class='kw'>end</span></pre>
|
406
|
+
</td>
|
407
|
+
</tr>
|
408
|
+
</table>
|
409
|
+
</div>
|
410
|
+
|
411
|
+
</div>
|
412
|
+
|
413
|
+
|
414
|
+
<div id="instance_method_details" class="method_details_list">
|
415
|
+
<h2>Instance Method Details</h2>
|
416
|
+
|
417
|
+
|
418
|
+
<div class="method_details first">
|
419
|
+
<h3 class="signature first" id="add_parcel-instance_method">
|
420
|
+
|
421
|
+
#<strong>add_parcel</strong>(name, description, task) ⇒ <tt>Array<<span class='object_link'><a href="Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>></tt>
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
|
427
|
+
</h3><div class="docstring">
|
428
|
+
<div class="discussion">
|
429
|
+
|
430
|
+
<p>Returns pending parcels.</p>
|
431
|
+
|
432
|
+
|
433
|
+
</div>
|
434
|
+
</div>
|
435
|
+
<div class="tags">
|
436
|
+
<p class="tag_title">Parameters:</p>
|
437
|
+
<ul class="param">
|
438
|
+
|
439
|
+
<li>
|
440
|
+
|
441
|
+
<span class='name'>name</span>
|
442
|
+
|
443
|
+
|
444
|
+
<span class='type'>(<tt>string</tt>)</span>
|
445
|
+
|
446
|
+
|
447
|
+
|
448
|
+
—
|
449
|
+
<div class='inline'>
|
450
|
+
<p>name of the task</p>
|
451
|
+
</div>
|
452
|
+
|
453
|
+
</li>
|
454
|
+
|
455
|
+
<li>
|
456
|
+
|
457
|
+
<span class='name'>description</span>
|
458
|
+
|
459
|
+
|
460
|
+
<span class='type'>(<tt>string</tt>)</span>
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
—
|
465
|
+
<div class='inline'>
|
466
|
+
<p>small description of the task</p>
|
467
|
+
</div>
|
468
|
+
|
469
|
+
</li>
|
470
|
+
|
471
|
+
<li>
|
472
|
+
|
473
|
+
<span class='name'>action</span>
|
474
|
+
|
475
|
+
|
476
|
+
<span class='type'>(<tt>Proc</tt>)</span>
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
—
|
481
|
+
<div class='inline'>
|
482
|
+
<p>action to run in separate thread</p>
|
483
|
+
</div>
|
484
|
+
|
485
|
+
</li>
|
486
|
+
|
487
|
+
</ul>
|
488
|
+
|
489
|
+
<p class="tag_title">Returns:</p>
|
490
|
+
<ul class="return">
|
491
|
+
|
492
|
+
<li>
|
493
|
+
|
494
|
+
|
495
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>></tt>)</span>
|
496
|
+
|
497
|
+
|
498
|
+
|
499
|
+
—
|
500
|
+
<div class='inline'>
|
501
|
+
<p>pending parcels</p>
|
502
|
+
</div>
|
503
|
+
|
504
|
+
</li>
|
505
|
+
|
506
|
+
</ul>
|
507
|
+
|
508
|
+
</div><table class="source_code">
|
509
|
+
<tr>
|
510
|
+
<td>
|
511
|
+
<pre class="lines">
|
512
|
+
|
513
|
+
|
514
|
+
22
|
515
|
+
23
|
516
|
+
24
|
517
|
+
25</pre>
|
518
|
+
</td>
|
519
|
+
<td>
|
520
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor/belt.rb', line 22</span>
|
521
|
+
|
522
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_add_parcel'>add_parcel</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_description'>description</span><span class='comma'>,</span> <span class='id identifier rubyid_task'>task</span><span class='rparen'>)</span>
|
523
|
+
<span class='id identifier rubyid_parcel'>parcel</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../TinyConveyor.html#new-class_method" title="TinyConveyor.new (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_description'>description</span><span class='comma'>,</span> <span class='id identifier rubyid_task'>task</span><span class='rparen'>)</span>
|
524
|
+
<span class='ivar'>@parcels</span> <span class='op'><<</span> <span class='id identifier rubyid_parcel'>parcel</span>
|
525
|
+
<span class='kw'>end</span></pre>
|
526
|
+
</td>
|
527
|
+
</tr>
|
528
|
+
</table>
|
529
|
+
</div>
|
530
|
+
|
531
|
+
<div class="method_details ">
|
532
|
+
<h3 class="signature " id="remove_parcel_by_uuid-instance_method">
|
533
|
+
|
534
|
+
#<strong>remove_parcel_by_uuid</strong>(uuid) ⇒ <tt>Array<<span class='object_link'><a href="Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>></tt>
|
535
|
+
|
536
|
+
|
537
|
+
|
538
|
+
|
539
|
+
|
540
|
+
</h3><div class="docstring">
|
541
|
+
<div class="discussion">
|
542
|
+
|
543
|
+
<p>Returns pending parcels.</p>
|
544
|
+
|
545
|
+
|
546
|
+
</div>
|
547
|
+
</div>
|
548
|
+
<div class="tags">
|
549
|
+
<p class="tag_title">Parameters:</p>
|
550
|
+
<ul class="param">
|
551
|
+
|
552
|
+
<li>
|
553
|
+
|
554
|
+
<span class='name'>uuid</span>
|
555
|
+
|
556
|
+
|
557
|
+
<span class='type'>(<tt>string</tt>)</span>
|
558
|
+
|
559
|
+
|
560
|
+
|
561
|
+
—
|
562
|
+
<div class='inline'>
|
563
|
+
<p>uuid of the parcel to remove</p>
|
564
|
+
</div>
|
565
|
+
|
566
|
+
</li>
|
567
|
+
|
568
|
+
</ul>
|
569
|
+
|
570
|
+
<p class="tag_title">Returns:</p>
|
571
|
+
<ul class="return">
|
572
|
+
|
573
|
+
<li>
|
574
|
+
|
575
|
+
|
576
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>></tt>)</span>
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
—
|
581
|
+
<div class='inline'>
|
582
|
+
<p>pending parcels</p>
|
583
|
+
</div>
|
584
|
+
|
585
|
+
</li>
|
586
|
+
|
587
|
+
</ul>
|
588
|
+
|
589
|
+
</div><table class="source_code">
|
590
|
+
<tr>
|
591
|
+
<td>
|
592
|
+
<pre class="lines">
|
593
|
+
|
594
|
+
|
595
|
+
29
|
596
|
+
30
|
597
|
+
31
|
598
|
+
32
|
599
|
+
33
|
600
|
+
34</pre>
|
601
|
+
</td>
|
602
|
+
<td>
|
603
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor/belt.rb', line 29</span>
|
604
|
+
|
605
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove_parcel_by_uuid'>remove_parcel_by_uuid</span><span class='lparen'>(</span><span class='id identifier rubyid_uuid'>uuid</span><span class='rparen'>)</span>
|
606
|
+
<span class='id identifier rubyid_parcel'>parcel</span> <span class='op'>=</span> <span class='ivar'>@parcels</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_p'>p</span><span class='op'>|</span> <span class='id identifier rubyid_p'>p</span><span class='period'>.</span><span class='id identifier rubyid_uuid'>uuid</span> <span class='op'>==</span> <span class='id identifier rubyid_uuid'>uuid</span> <span class='rbrace'>}</span>
|
607
|
+
<span class='kw'>return</span> <span class='ivar'>@parcels</span> <span class='kw'>if</span> <span class='id identifier rubyid_parcel'>parcel</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
608
|
+
|
609
|
+
<span class='id identifier rubyid_remove_parcel'>remove_parcel</span><span class='lparen'>(</span><span class='id identifier rubyid_parcel'>parcel</span><span class='rparen'>)</span>
|
610
|
+
<span class='kw'>end</span></pre>
|
611
|
+
</td>
|
612
|
+
</tr>
|
613
|
+
</table>
|
614
|
+
</div>
|
615
|
+
|
616
|
+
<div class="method_details ">
|
617
|
+
<h3 class="signature " id="run_belt_entirely-instance_method">
|
618
|
+
|
619
|
+
#<strong>run_belt_entirely</strong> ⇒ <tt>Object</tt>
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
|
625
|
+
</h3><table class="source_code">
|
626
|
+
<tr>
|
627
|
+
<td>
|
628
|
+
<pre class="lines">
|
629
|
+
|
630
|
+
|
631
|
+
40
|
632
|
+
41
|
633
|
+
42</pre>
|
634
|
+
</td>
|
635
|
+
<td>
|
636
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor/belt.rb', line 40</span>
|
637
|
+
|
638
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_run_belt_entirely'>run_belt_entirely</span>
|
639
|
+
<span class='id identifier rubyid_execute'>execute</span> <span class='kw'>until</span> <span class='ivar'>@parcels</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
640
|
+
<span class='kw'>end</span></pre>
|
641
|
+
</td>
|
642
|
+
</tr>
|
643
|
+
</table>
|
644
|
+
</div>
|
645
|
+
|
646
|
+
<div class="method_details ">
|
647
|
+
<h3 class="signature " id="running?-instance_method">
|
648
|
+
|
649
|
+
#<strong>running?</strong> ⇒ <tt>boolean</tt>
|
650
|
+
|
651
|
+
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
</h3><div class="docstring">
|
656
|
+
<div class="discussion">
|
657
|
+
|
658
|
+
<p>Returns true if the belt is running, false otherwhise.</p>
|
659
|
+
|
660
|
+
|
661
|
+
</div>
|
662
|
+
</div>
|
663
|
+
<div class="tags">
|
664
|
+
|
665
|
+
<p class="tag_title">Returns:</p>
|
666
|
+
<ul class="return">
|
667
|
+
|
668
|
+
<li>
|
669
|
+
|
670
|
+
|
671
|
+
<span class='type'>(<tt>boolean</tt>)</span>
|
672
|
+
|
673
|
+
|
674
|
+
|
675
|
+
—
|
676
|
+
<div class='inline'>
|
677
|
+
<p>true if the belt is running, false otherwhise</p>
|
678
|
+
</div>
|
679
|
+
|
680
|
+
</li>
|
681
|
+
|
682
|
+
</ul>
|
683
|
+
|
684
|
+
</div><table class="source_code">
|
685
|
+
<tr>
|
686
|
+
<td>
|
687
|
+
<pre class="lines">
|
688
|
+
|
689
|
+
|
690
|
+
45
|
691
|
+
46
|
692
|
+
47</pre>
|
693
|
+
</td>
|
694
|
+
<td>
|
695
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor/belt.rb', line 45</span>
|
696
|
+
|
697
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_running?'>running?</span>
|
698
|
+
<span class='ivar'>@state</span> <span class='op'>==</span> <span class='symbol'>:running</span>
|
699
|
+
<span class='kw'>end</span></pre>
|
700
|
+
</td>
|
701
|
+
</tr>
|
702
|
+
</table>
|
703
|
+
</div>
|
704
|
+
|
705
|
+
<div class="method_details ">
|
706
|
+
<h3 class="signature " id="start_belt-instance_method">
|
707
|
+
|
708
|
+
#<strong>start_belt</strong> ⇒ <tt>Object</tt>
|
709
|
+
|
710
|
+
|
711
|
+
|
712
|
+
|
713
|
+
|
714
|
+
</h3><table class="source_code">
|
715
|
+
<tr>
|
716
|
+
<td>
|
717
|
+
<pre class="lines">
|
718
|
+
|
719
|
+
|
720
|
+
36
|
721
|
+
37
|
722
|
+
38</pre>
|
723
|
+
</td>
|
724
|
+
<td>
|
725
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor/belt.rb', line 36</span>
|
726
|
+
|
727
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_start_belt'>start_belt</span>
|
728
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_async'>async</span><span class='period'>.</span><span class='id identifier rubyid_run_belt_entirely'>run_belt_entirely</span>
|
729
|
+
<span class='kw'>end</span></pre>
|
730
|
+
</td>
|
731
|
+
</tr>
|
732
|
+
</table>
|
733
|
+
</div>
|
734
|
+
|
735
|
+
</div>
|
736
|
+
|
737
|
+
</div>
|
738
|
+
|
739
|
+
<div id="footer">
|
740
|
+
Generated on Sun Jun 6 12:46:52 2021 by
|
741
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
742
|
+
0.9.26 (ruby-2.6.6).
|
743
|
+
</div>
|
744
|
+
|
745
|
+
</div>
|
746
|
+
</body>
|
747
|
+
</html>
|