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
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5d3c563e6662a84d0c059210a6755a6d36a087f2e4e5ad31f7731e9eddb7b28d
|
4
|
+
data.tar.gz: 319fc5b53727eef99f659774816c5e5bbc05ff141465d2b288ed6d69af7420a2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: '087ac5b41c9f612f1dd149aac4907e0445ee1521198f5c38e7a518cd49acbdfbfa560f7489226d271f9b4c6b1fe8872b26ab1a850b0b27825c5694dd04f5a870'
|
7
|
+
data.tar.gz: e65214233beb1ba096d3635752d3e8572a55bd6fc874188581f7ef7ad9170fb7481ef72baf4c7626715da24b12fc1637dcc4dbd140cb3a6af42b9f95d11df9b7
|
data/.gitignore
ADDED
data/.rspec
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
--require spec_helper
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# Tiny Conveyor
|
2
|
+
This gem is a tiny wrapper for [concurrent-ruby](http://www.concurrent-ruby.com/) that can create and execute a queue of tasks, each of the task run in a separated thread.
|
3
|
+
|
4
|
+
## Setup
|
5
|
+
|
6
|
+
To use this gem you can simply install it with gem :
|
7
|
+
|
8
|
+
``` ruby
|
9
|
+
gem install tiny_conveyor
|
10
|
+
```
|
11
|
+
|
12
|
+
or add the following line to your Gemfile :
|
13
|
+
|
14
|
+
``` ruby
|
15
|
+
gem 'tiny_conveyor'
|
16
|
+
```
|
17
|
+
|
18
|
+
## Usage
|
19
|
+
### Instantiation
|
20
|
+
|
21
|
+
``` ruby
|
22
|
+
require 'tiny_conveyor'
|
23
|
+
conveyor = TinyConveyor.new
|
24
|
+
```
|
25
|
+
|
26
|
+
### Run task
|
27
|
+
|
28
|
+
``` ruby
|
29
|
+
action = proc { puts 'Run in a separated thread' }
|
30
|
+
conveyor.add_parcel('first action', 'a simple task that print a sentence', action)
|
31
|
+
conveyor.start_belt
|
32
|
+
```
|
33
|
+
|
34
|
+
### Remove unstarted task
|
35
|
+
|
36
|
+
``` ruby
|
37
|
+
conveyor.add_parcel('first action', 'a simple task that print a sentence', action)
|
38
|
+
conveyor.start_belt
|
39
|
+
```
|
40
|
+
|
41
|
+
### Check if a task is running
|
42
|
+
|
43
|
+
``` ruby
|
44
|
+
conveyor.running?
|
45
|
+
```
|
46
|
+
|
47
|
+
### Check current pending tasks
|
48
|
+
|
49
|
+
``` ruby
|
50
|
+
conveyor.parcels
|
51
|
+
```
|
52
|
+
|
53
|
+
## Acknowledgements
|
54
|
+
Icons made by xnimrodx from [flaticon](https://www.flaticon.com/)
|
@@ -0,0 +1,774 @@
|
|
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
|
+
Module: TinyConveyor
|
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";
|
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 (T)</a> »
|
40
|
+
|
41
|
+
|
42
|
+
<span class="title">TinyConveyor</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>Module: TinyConveyor
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/tiny_conveyor.rb<span class="defines">,<br />
|
82
|
+
lib/tiny_conveyor/belt.rb,<br /> lib/tiny_conveyor/parcel.rb</span>
|
83
|
+
</dd>
|
84
|
+
</dl>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
<h2>Overview</h2><div class="docstring">
|
89
|
+
<div class="discussion">
|
90
|
+
|
91
|
+
<p>main file for Tiny Conveyor gem</p>
|
92
|
+
|
93
|
+
|
94
|
+
</div>
|
95
|
+
</div>
|
96
|
+
<div class="tags">
|
97
|
+
|
98
|
+
|
99
|
+
</div><h2>Defined Under Namespace</h2>
|
100
|
+
<p class="children">
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="TinyConveyor/Belt.html" title="TinyConveyor::Belt (class)">Belt</a></span>, <span class='object_link'><a href="TinyConveyor/Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>
|
106
|
+
|
107
|
+
|
108
|
+
</p>
|
109
|
+
|
110
|
+
|
111
|
+
<h2>
|
112
|
+
Constant Summary
|
113
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
114
|
+
</h2>
|
115
|
+
|
116
|
+
<dl class="constants">
|
117
|
+
|
118
|
+
<dt id="VERSION-constant" class="">VERSION =
|
119
|
+
|
120
|
+
</dt>
|
121
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.0.1</span><span class='tstring_end'>'</span></span></pre></dd>
|
122
|
+
|
123
|
+
</dl>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<h2>
|
134
|
+
Class Method Summary
|
135
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
136
|
+
</h2>
|
137
|
+
|
138
|
+
<ul class="summary">
|
139
|
+
|
140
|
+
<li class="public ">
|
141
|
+
<span class="summary_signature">
|
142
|
+
|
143
|
+
<a href="#add_parcel-class_method" title="add_parcel (class method)">.<strong>add_parcel</strong>(name, description, action) ⇒ Array<Parcel> </a>
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
</span>
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<span class="summary_desc"><div class='inline'>
|
158
|
+
<p>Pending parcels.</p>
|
159
|
+
</div></span>
|
160
|
+
|
161
|
+
</li>
|
162
|
+
|
163
|
+
|
164
|
+
<li class="public ">
|
165
|
+
<span class="summary_signature">
|
166
|
+
|
167
|
+
<a href="#belt-class_method" title="belt (class method)">.<strong>belt</strong> ⇒ Belt </a>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
</span>
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
182
|
+
|
183
|
+
</li>
|
184
|
+
|
185
|
+
|
186
|
+
<li class="public ">
|
187
|
+
<span class="summary_signature">
|
188
|
+
|
189
|
+
<a href="#new-class_method" title="new (class method)">.<strong>new</strong> ⇒ Belt </a>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
</span>
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
<span class="summary_desc"><div class='inline'>
|
204
|
+
<p>Newly created belt.</p>
|
205
|
+
</div></span>
|
206
|
+
|
207
|
+
</li>
|
208
|
+
|
209
|
+
|
210
|
+
<li class="public ">
|
211
|
+
<span class="summary_signature">
|
212
|
+
|
213
|
+
<a href="#parcels-class_method" title="parcels (class method)">.<strong>parcels</strong> ⇒ Array<Parcel> </a>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
</span>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
<span class="summary_desc"><div class='inline'>
|
228
|
+
<p>Pending parcels.</p>
|
229
|
+
</div></span>
|
230
|
+
|
231
|
+
</li>
|
232
|
+
|
233
|
+
|
234
|
+
<li class="public ">
|
235
|
+
<span class="summary_signature">
|
236
|
+
|
237
|
+
<a href="#remove_parcel-class_method" title="remove_parcel (class method)">.<strong>remove_parcel</strong>(uuid) ⇒ Array<Parcel> </a>
|
238
|
+
|
239
|
+
|
240
|
+
|
241
|
+
</span>
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
<span class="summary_desc"><div class='inline'>
|
252
|
+
<p>Pending parcels.</p>
|
253
|
+
</div></span>
|
254
|
+
|
255
|
+
</li>
|
256
|
+
|
257
|
+
|
258
|
+
<li class="public ">
|
259
|
+
<span class="summary_signature">
|
260
|
+
|
261
|
+
<a href="#running%3F-class_method" title="running? (class method)">.<strong>running?</strong> ⇒ boolean </a>
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
</span>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
<span class="summary_desc"><div class='inline'>
|
276
|
+
<p>True if the belt is running, false otherwhise.</p>
|
277
|
+
</div></span>
|
278
|
+
|
279
|
+
</li>
|
280
|
+
|
281
|
+
|
282
|
+
<li class="public ">
|
283
|
+
<span class="summary_signature">
|
284
|
+
|
285
|
+
<a href="#start_belt-class_method" title="start_belt (class method)">.<strong>start_belt</strong> ⇒ Object </a>
|
286
|
+
|
287
|
+
|
288
|
+
|
289
|
+
</span>
|
290
|
+
|
291
|
+
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
300
|
+
|
301
|
+
</li>
|
302
|
+
|
303
|
+
|
304
|
+
</ul>
|
305
|
+
|
306
|
+
|
307
|
+
|
308
|
+
|
309
|
+
<div id="class_method_details" class="method_details_list">
|
310
|
+
<h2>Class Method Details</h2>
|
311
|
+
|
312
|
+
|
313
|
+
<div class="method_details first">
|
314
|
+
<h3 class="signature first" id="add_parcel-class_method">
|
315
|
+
|
316
|
+
.<strong>add_parcel</strong>(name, description, action) ⇒ <tt>Array<<span class='object_link'><a href="TinyConveyor/Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>></tt>
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
</h3><div class="docstring">
|
323
|
+
<div class="discussion">
|
324
|
+
|
325
|
+
<p>Returns pending parcels.</p>
|
326
|
+
|
327
|
+
|
328
|
+
</div>
|
329
|
+
</div>
|
330
|
+
<div class="tags">
|
331
|
+
<p class="tag_title">Parameters:</p>
|
332
|
+
<ul class="param">
|
333
|
+
|
334
|
+
<li>
|
335
|
+
|
336
|
+
<span class='name'>name</span>
|
337
|
+
|
338
|
+
|
339
|
+
<span class='type'>(<tt>string</tt>)</span>
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
—
|
344
|
+
<div class='inline'>
|
345
|
+
<p>name of the task</p>
|
346
|
+
</div>
|
347
|
+
|
348
|
+
</li>
|
349
|
+
|
350
|
+
<li>
|
351
|
+
|
352
|
+
<span class='name'>description</span>
|
353
|
+
|
354
|
+
|
355
|
+
<span class='type'>(<tt>string</tt>)</span>
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
—
|
360
|
+
<div class='inline'>
|
361
|
+
<p>small description of the task</p>
|
362
|
+
</div>
|
363
|
+
|
364
|
+
</li>
|
365
|
+
|
366
|
+
<li>
|
367
|
+
|
368
|
+
<span class='name'>action</span>
|
369
|
+
|
370
|
+
|
371
|
+
<span class='type'>(<tt>Proc</tt>)</span>
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
—
|
376
|
+
<div class='inline'>
|
377
|
+
<p>action to run in separate thread</p>
|
378
|
+
</div>
|
379
|
+
|
380
|
+
</li>
|
381
|
+
|
382
|
+
</ul>
|
383
|
+
|
384
|
+
<p class="tag_title">Returns:</p>
|
385
|
+
<ul class="return">
|
386
|
+
|
387
|
+
<li>
|
388
|
+
|
389
|
+
|
390
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="TinyConveyor/Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>></tt>)</span>
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
—
|
395
|
+
<div class='inline'>
|
396
|
+
<p>pending parcels</p>
|
397
|
+
</div>
|
398
|
+
|
399
|
+
</li>
|
400
|
+
|
401
|
+
</ul>
|
402
|
+
|
403
|
+
</div><table class="source_code">
|
404
|
+
<tr>
|
405
|
+
<td>
|
406
|
+
<pre class="lines">
|
407
|
+
|
408
|
+
|
409
|
+
20
|
410
|
+
21
|
411
|
+
22</pre>
|
412
|
+
</td>
|
413
|
+
<td>
|
414
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor.rb', line 20</span>
|
415
|
+
|
416
|
+
<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_action'>action</span><span class='rparen'>)</span>
|
417
|
+
<span class='id identifier rubyid_belt'>belt</span><span class='period'>.</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_action'>action</span><span class='rparen'>)</span>
|
418
|
+
<span class='kw'>end</span></pre>
|
419
|
+
</td>
|
420
|
+
</tr>
|
421
|
+
</table>
|
422
|
+
</div>
|
423
|
+
|
424
|
+
<div class="method_details ">
|
425
|
+
<h3 class="signature " id="belt-class_method">
|
426
|
+
|
427
|
+
.<strong>belt</strong> ⇒ <tt><span class='object_link'><a href="TinyConveyor/Belt.html" title="TinyConveyor::Belt (class)">Belt</a></span></tt>
|
428
|
+
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
|
433
|
+
</h3><div class="docstring">
|
434
|
+
<div class="discussion">
|
435
|
+
|
436
|
+
|
437
|
+
</div>
|
438
|
+
</div>
|
439
|
+
<div class="tags">
|
440
|
+
|
441
|
+
<p class="tag_title">Returns:</p>
|
442
|
+
<ul class="return">
|
443
|
+
|
444
|
+
<li>
|
445
|
+
|
446
|
+
|
447
|
+
<span class='type'>(<tt><span class='object_link'><a href="TinyConveyor/Belt.html" title="TinyConveyor::Belt (class)">Belt</a></span></tt>)</span>
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
</li>
|
452
|
+
|
453
|
+
</ul>
|
454
|
+
|
455
|
+
</div><table class="source_code">
|
456
|
+
<tr>
|
457
|
+
<td>
|
458
|
+
<pre class="lines">
|
459
|
+
|
460
|
+
|
461
|
+
45
|
462
|
+
46
|
463
|
+
47</pre>
|
464
|
+
</td>
|
465
|
+
<td>
|
466
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor.rb', line 45</span>
|
467
|
+
|
468
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_belt'>belt</span>
|
469
|
+
<span class='ivar'>@belt</span> <span class='op'>||=</span> <span class='const'><span class='object_link'><a href="TinyConveyor/Belt.html" title="TinyConveyor::Belt (class)">Belt</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#new-class_method" title="TinyConveyor.new (method)">new</a></span></span>
|
470
|
+
<span class='kw'>end</span></pre>
|
471
|
+
</td>
|
472
|
+
</tr>
|
473
|
+
</table>
|
474
|
+
</div>
|
475
|
+
|
476
|
+
<div class="method_details ">
|
477
|
+
<h3 class="signature " id="new-class_method">
|
478
|
+
|
479
|
+
.<strong>new</strong> ⇒ <tt><span class='object_link'><a href="TinyConveyor/Belt.html" title="TinyConveyor::Belt (class)">Belt</a></span></tt>
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
</h3><div class="docstring">
|
486
|
+
<div class="discussion">
|
487
|
+
|
488
|
+
<p>Returns newly created belt.</p>
|
489
|
+
|
490
|
+
|
491
|
+
</div>
|
492
|
+
</div>
|
493
|
+
<div class="tags">
|
494
|
+
|
495
|
+
<p class="tag_title">Returns:</p>
|
496
|
+
<ul class="return">
|
497
|
+
|
498
|
+
<li>
|
499
|
+
|
500
|
+
|
501
|
+
<span class='type'>(<tt><span class='object_link'><a href="TinyConveyor/Belt.html" title="TinyConveyor::Belt (class)">Belt</a></span></tt>)</span>
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
—
|
506
|
+
<div class='inline'>
|
507
|
+
<p>newly created belt</p>
|
508
|
+
</div>
|
509
|
+
|
510
|
+
</li>
|
511
|
+
|
512
|
+
</ul>
|
513
|
+
|
514
|
+
</div><table class="source_code">
|
515
|
+
<tr>
|
516
|
+
<td>
|
517
|
+
<pre class="lines">
|
518
|
+
|
519
|
+
|
520
|
+
12
|
521
|
+
13
|
522
|
+
14</pre>
|
523
|
+
</td>
|
524
|
+
<td>
|
525
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor.rb', line 12</span>
|
526
|
+
|
527
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_new'>new</span>
|
528
|
+
<span class='id identifier rubyid_belt'>belt</span>
|
529
|
+
<span class='kw'>end</span></pre>
|
530
|
+
</td>
|
531
|
+
</tr>
|
532
|
+
</table>
|
533
|
+
</div>
|
534
|
+
|
535
|
+
<div class="method_details ">
|
536
|
+
<h3 class="signature " id="parcels-class_method">
|
537
|
+
|
538
|
+
.<strong>parcels</strong> ⇒ <tt>Array<<span class='object_link'><a href="TinyConveyor/Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>></tt>
|
539
|
+
|
540
|
+
|
541
|
+
|
542
|
+
|
543
|
+
|
544
|
+
</h3><div class="docstring">
|
545
|
+
<div class="discussion">
|
546
|
+
|
547
|
+
<p>Returns pending parcels.</p>
|
548
|
+
|
549
|
+
|
550
|
+
</div>
|
551
|
+
</div>
|
552
|
+
<div class="tags">
|
553
|
+
|
554
|
+
<p class="tag_title">Returns:</p>
|
555
|
+
<ul class="return">
|
556
|
+
|
557
|
+
<li>
|
558
|
+
|
559
|
+
|
560
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="TinyConveyor/Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>></tt>)</span>
|
561
|
+
|
562
|
+
|
563
|
+
|
564
|
+
—
|
565
|
+
<div class='inline'>
|
566
|
+
<p>pending parcels</p>
|
567
|
+
</div>
|
568
|
+
|
569
|
+
</li>
|
570
|
+
|
571
|
+
</ul>
|
572
|
+
|
573
|
+
</div><table class="source_code">
|
574
|
+
<tr>
|
575
|
+
<td>
|
576
|
+
<pre class="lines">
|
577
|
+
|
578
|
+
|
579
|
+
40
|
580
|
+
41
|
581
|
+
42</pre>
|
582
|
+
</td>
|
583
|
+
<td>
|
584
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor.rb', line 40</span>
|
585
|
+
|
586
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_parcels'>parcels</span>
|
587
|
+
<span class='id identifier rubyid_belt'>belt</span><span class='period'>.</span><span class='id identifier rubyid_parcels'>parcels</span>
|
588
|
+
<span class='kw'>end</span></pre>
|
589
|
+
</td>
|
590
|
+
</tr>
|
591
|
+
</table>
|
592
|
+
</div>
|
593
|
+
|
594
|
+
<div class="method_details ">
|
595
|
+
<h3 class="signature " id="remove_parcel-class_method">
|
596
|
+
|
597
|
+
.<strong>remove_parcel</strong>(uuid) ⇒ <tt>Array<<span class='object_link'><a href="TinyConveyor/Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>></tt>
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
|
603
|
+
</h3><div class="docstring">
|
604
|
+
<div class="discussion">
|
605
|
+
|
606
|
+
<p>Returns pending parcels.</p>
|
607
|
+
|
608
|
+
|
609
|
+
</div>
|
610
|
+
</div>
|
611
|
+
<div class="tags">
|
612
|
+
<p class="tag_title">Parameters:</p>
|
613
|
+
<ul class="param">
|
614
|
+
|
615
|
+
<li>
|
616
|
+
|
617
|
+
<span class='name'>uuid</span>
|
618
|
+
|
619
|
+
|
620
|
+
<span class='type'>(<tt>string</tt>)</span>
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
—
|
625
|
+
<div class='inline'>
|
626
|
+
<p>uuid of the parcel to remove</p>
|
627
|
+
</div>
|
628
|
+
|
629
|
+
</li>
|
630
|
+
|
631
|
+
</ul>
|
632
|
+
|
633
|
+
<p class="tag_title">Returns:</p>
|
634
|
+
<ul class="return">
|
635
|
+
|
636
|
+
<li>
|
637
|
+
|
638
|
+
|
639
|
+
<span class='type'>(<tt>Array<<span class='object_link'><a href="TinyConveyor/Parcel.html" title="TinyConveyor::Parcel (class)">Parcel</a></span>></tt>)</span>
|
640
|
+
|
641
|
+
|
642
|
+
|
643
|
+
—
|
644
|
+
<div class='inline'>
|
645
|
+
<p>pending parcels</p>
|
646
|
+
</div>
|
647
|
+
|
648
|
+
</li>
|
649
|
+
|
650
|
+
</ul>
|
651
|
+
|
652
|
+
</div><table class="source_code">
|
653
|
+
<tr>
|
654
|
+
<td>
|
655
|
+
<pre class="lines">
|
656
|
+
|
657
|
+
|
658
|
+
26
|
659
|
+
27
|
660
|
+
28</pre>
|
661
|
+
</td>
|
662
|
+
<td>
|
663
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor.rb', line 26</span>
|
664
|
+
|
665
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove_parcel'>remove_parcel</span><span class='lparen'>(</span><span class='id identifier rubyid_uuid'>uuid</span><span class='rparen'>)</span>
|
666
|
+
<span class='id identifier rubyid_belt'>belt</span><span class='period'>.</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>
|
667
|
+
<span class='kw'>end</span></pre>
|
668
|
+
</td>
|
669
|
+
</tr>
|
670
|
+
</table>
|
671
|
+
</div>
|
672
|
+
|
673
|
+
<div class="method_details ">
|
674
|
+
<h3 class="signature " id="running?-class_method">
|
675
|
+
|
676
|
+
.<strong>running?</strong> ⇒ <tt>boolean</tt>
|
677
|
+
|
678
|
+
|
679
|
+
|
680
|
+
|
681
|
+
|
682
|
+
</h3><div class="docstring">
|
683
|
+
<div class="discussion">
|
684
|
+
|
685
|
+
<p>Returns true if the belt is running, false otherwhise.</p>
|
686
|
+
|
687
|
+
|
688
|
+
</div>
|
689
|
+
</div>
|
690
|
+
<div class="tags">
|
691
|
+
|
692
|
+
<p class="tag_title">Returns:</p>
|
693
|
+
<ul class="return">
|
694
|
+
|
695
|
+
<li>
|
696
|
+
|
697
|
+
|
698
|
+
<span class='type'>(<tt>boolean</tt>)</span>
|
699
|
+
|
700
|
+
|
701
|
+
|
702
|
+
—
|
703
|
+
<div class='inline'>
|
704
|
+
<p>true if the belt is running, false otherwhise</p>
|
705
|
+
</div>
|
706
|
+
|
707
|
+
</li>
|
708
|
+
|
709
|
+
</ul>
|
710
|
+
|
711
|
+
</div><table class="source_code">
|
712
|
+
<tr>
|
713
|
+
<td>
|
714
|
+
<pre class="lines">
|
715
|
+
|
716
|
+
|
717
|
+
35
|
718
|
+
36
|
719
|
+
37</pre>
|
720
|
+
</td>
|
721
|
+
<td>
|
722
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor.rb', line 35</span>
|
723
|
+
|
724
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_running?'>running?</span>
|
725
|
+
<span class='id identifier rubyid_belt'>belt</span><span class='period'>.</span><span class='id identifier rubyid_running?'>running?</span>
|
726
|
+
<span class='kw'>end</span></pre>
|
727
|
+
</td>
|
728
|
+
</tr>
|
729
|
+
</table>
|
730
|
+
</div>
|
731
|
+
|
732
|
+
<div class="method_details ">
|
733
|
+
<h3 class="signature " id="start_belt-class_method">
|
734
|
+
|
735
|
+
.<strong>start_belt</strong> ⇒ <tt>Object</tt>
|
736
|
+
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
</h3><table class="source_code">
|
742
|
+
<tr>
|
743
|
+
<td>
|
744
|
+
<pre class="lines">
|
745
|
+
|
746
|
+
|
747
|
+
30
|
748
|
+
31
|
749
|
+
32</pre>
|
750
|
+
</td>
|
751
|
+
<td>
|
752
|
+
<pre class="code"><span class="info file"># File 'lib/tiny_conveyor.rb', line 30</span>
|
753
|
+
|
754
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_start_belt'>start_belt</span>
|
755
|
+
<span class='id identifier rubyid_belt'>belt</span><span class='period'>.</span><span class='id identifier rubyid_start_belt'>start_belt</span>
|
756
|
+
<span class='kw'>end</span></pre>
|
757
|
+
</td>
|
758
|
+
</tr>
|
759
|
+
</table>
|
760
|
+
</div>
|
761
|
+
|
762
|
+
</div>
|
763
|
+
|
764
|
+
</div>
|
765
|
+
|
766
|
+
<div id="footer">
|
767
|
+
Generated on Sun Jun 6 12:46:52 2021 by
|
768
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
769
|
+
0.9.26 (ruby-2.6.6).
|
770
|
+
</div>
|
771
|
+
|
772
|
+
</div>
|
773
|
+
</body>
|
774
|
+
</html>
|