raspberry_pi_iot 0.0.12 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/doc/IoT.html +6 -4
  3. data/doc/RaspberryPiIoT.html +16 -10
  4. data/doc/_index.html +197 -21
  5. data/doc/class_list.html +1 -1
  6. data/doc/file.LICENSE.html +1 -1
  7. data/doc/file.README.html +15 -6
  8. data/doc/index.html +15 -6
  9. data/doc/method_list.html +590 -30
  10. data/doc/top-level-namespace.html +2 -2
  11. data/lib/iot/bh1750.rb +6 -4
  12. data/lib/iot/receptor.rb +6 -0
  13. data/lib/raspberry_pi.rb +1 -1
  14. data/lib/raspberry_pi_iot/version.rb +1 -1
  15. data/test/test.sh +5 -0
  16. data/test/test.txt +52 -169
  17. data/test/test_bh1750.rb +5 -0
  18. data/test/test_ky008.rb +41 -0
  19. metadata +2 -29
  20. data/doc/Actuator.html +0 -145
  21. data/doc/BH1750.html +0 -541
  22. data/doc/BME280.html +0 -276
  23. data/doc/BMP280.html +0 -276
  24. data/doc/BMxSensor.html +0 -557
  25. data/doc/BinaryActuator.html +0 -177
  26. data/doc/BinaryEffector.html +0 -246
  27. data/doc/BinaryReceptor.html +0 -387
  28. data/doc/BinarySensor.html +0 -168
  29. data/doc/Bus.html +0 -126
  30. data/doc/Button.html +0 -1276
  31. data/doc/DHT11.html +0 -287
  32. data/doc/DHT22.html +0 -287
  33. data/doc/DHTxxSensor.html +0 -361
  34. data/doc/DS18B20.html +0 -339
  35. data/doc/DigitalActuator.html +0 -164
  36. data/doc/DigitalEffector.html +0 -624
  37. data/doc/DigitalReceptor.html +0 -242
  38. data/doc/DigitalSensor.html +0 -162
  39. data/doc/Effector.html +0 -257
  40. data/doc/HCSR501.html +0 -172
  41. data/doc/HumitureSensor.html +0 -453
  42. data/doc/LED.html +0 -836
  43. data/doc/MAX44009.html +0 -830
  44. data/doc/RaspberryPi.html +0 -544
  45. data/doc/Receptor.html +0 -257
  46. data/doc/Sensor.html +0 -145
  47. data/doc/TemperatureSensor.html +0 -644
@@ -1,168 +0,0 @@
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: BinarySensor
8
-
9
- &mdash; Documentation by YARD 0.9.16
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
- pathId = "BinarySensor";
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> &raquo;
40
-
41
-
42
- <span class="title">BinarySensor</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: BinarySensor
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName"><span class='object_link'><a href="BinaryReceptor.html" title="BinaryReceptor (class)">BinaryReceptor</a></span></span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next"><span class='object_link'><a href="Receptor.html" title="Receptor (class)">Receptor</a></span></li>
78
-
79
- <li class="next"><span class='object_link'><a href="BinaryReceptor.html" title="BinaryReceptor (class)">BinaryReceptor</a></span></li>
80
-
81
- <li class="next">BinarySensor</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
- </dl>
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
- <dl>
100
- <dt>Defined in:</dt>
101
- <dd>lib/binary_sensor.rb</dd>
102
- </dl>
103
-
104
- </div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
-
109
- <p>BinarySensor - a synonym for BinaryReceptor</p>
110
-
111
-
112
- </div>
113
- </div>
114
- <div class="tags">
115
-
116
-
117
- </div><div id="subclasses">
118
- <h2>Direct Known Subclasses</h2>
119
- <p class="children"><span class='object_link'><a href="HCSR501.html" title="HCSR501 (class)">HCSR501</a></span></p>
120
- </div>
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
- <h2>Method Summary</h2>
136
-
137
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BinaryReceptor.html" title="BinaryReceptor (class)">BinaryReceptor</a></span></h3>
138
- <p class="inherited"><span class='object_link'><a href="BinaryReceptor.html#high%3F-instance_method" title="BinaryReceptor#high? (method)">#high?</a></span>, <span class='object_link'><a href="BinaryReceptor.html#initialize-instance_method" title="BinaryReceptor#initialize (method)">#initialize</a></span>, <span class='object_link'><a href="BinaryReceptor.html#low%3F-instance_method" title="BinaryReceptor#low? (method)">#low?</a></span></p>
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Receptor.html" title="Receptor (class)">Receptor</a></span></h3>
149
- <p class="inherited"><span class='object_link'><a href="Receptor.html#model_name-instance_method" title="Receptor#model_name (method)">#model_name</a></span>, <span class='object_link'><a href="Receptor.html#name-instance_method" title="Receptor#name (method)">#name</a></span></p>
150
- <div id="constructor_details" class="method_details_list">
151
- <h2>Constructor Details</h2>
152
-
153
- <p class="notice">This class inherits a constructor from <span class='object_link'><a href="BinaryReceptor.html#initialize-instance_method" title="BinaryReceptor#initialize (method)">BinaryReceptor</a></span></p>
154
-
155
- </div>
156
-
157
-
158
- </div>
159
-
160
- <div id="footer">
161
- Generated on Wed Dec 26 18:10:02 2018 by
162
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
163
- 0.9.16 (ruby-2.3.3).
164
- </div>
165
-
166
- </div>
167
- </body>
168
- </html>
@@ -1,126 +0,0 @@
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: Bus
8
-
9
- &mdash; Documentation by YARD 0.9.20
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
- pathId = "Bus";
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> &raquo;
40
-
41
-
42
- <span class="title">Bus</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: Bus
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/bus.rb</dd>
82
- </dl>
83
-
84
- </div>
85
-
86
- <h2>Overview</h2><div class="docstring">
87
- <div class="discussion">
88
-
89
- <p>Bus - interfaces for physical devices</p>
90
-
91
-
92
- </div>
93
- </div>
94
- <div class="tags">
95
-
96
-
97
- </div><h2>Defined Under Namespace</h2>
98
- <p class="children">
99
-
100
-
101
-
102
-
103
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="Bus/I2C.html" title="Bus::I2C (class)">I2C</a></span>, <span class='object_link'><a href="Bus/OneWire.html" title="Bus::OneWire (class)">OneWire</a></span>, <span class='object_link'><a href="Bus/SPI.html" title="Bus::SPI (class)">SPI</a></span>
104
-
105
-
106
- </p>
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
- </div>
117
-
118
- <div id="footer">
119
- Generated on Mon Jun 8 16:36:37 2020 by
120
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
- 0.9.20 (ruby-2.5.5).
122
- </div>
123
-
124
- </div>
125
- </body>
126
- </html>
@@ -1,1276 +0,0 @@
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: Button
8
-
9
- &mdash; Documentation by YARD 0.9.16
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
- pathId = "Button";
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> &raquo;
40
-
41
-
42
- <span class="title">Button</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: Button
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName"><span class='object_link'><a href="BinaryReceptor.html" title="BinaryReceptor (class)">BinaryReceptor</a></span></span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next"><span class='object_link'><a href="Receptor.html" title="Receptor (class)">Receptor</a></span></li>
78
-
79
- <li class="next"><span class='object_link'><a href="BinaryReceptor.html" title="BinaryReceptor (class)">BinaryReceptor</a></span></li>
80
-
81
- <li class="next">Button</li>
82
-
83
- </ul>
84
- <a href="#" class="inheritanceTree">show all</a>
85
-
86
- </dd>
87
- </dl>
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
- <dl>
100
- <dt>Defined in:</dt>
101
- <dd>lib/button.rb</dd>
102
- </dl>
103
-
104
- </div>
105
-
106
- <h2>Overview</h2><div class="docstring">
107
- <div class="discussion">
108
-
109
- <p>Button - simple tactile / push button</p>
110
-
111
-
112
- </div>
113
- </div>
114
- <div class="tags">
115
-
116
-
117
- </div>
118
-
119
-
120
-
121
- <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
122
- <ul class="summary">
123
-
124
- <li class="public ">
125
- <span class="summary_signature">
126
-
127
- <a href="#measure_pause=-instance_method" title="#measure_pause= (instance method)">#<strong>measure_pause</strong> &#x21d2; Object </a>
128
-
129
-
130
-
131
- </span>
132
-
133
-
134
-
135
-
136
-
137
- <span class="note title writeonly">writeonly</span>
138
-
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
- <span class="summary_desc"><div class='inline'>
147
- <p>Sets the attribute measure_pause.</p>
148
- </div></span>
149
-
150
- </li>
151
-
152
-
153
- </ul>
154
-
155
-
156
-
157
-
158
-
159
- <h2>
160
- Instance Method Summary
161
- <small><a href="#" class="summary_toggle">collapse</a></small>
162
- </h2>
163
-
164
- <ul class="summary">
165
-
166
- <li class="public ">
167
- <span class="summary_signature">
168
-
169
- <a href="#double_press%3F-instance_method" title="#double_press? (instance method)">#<strong>double_press?</strong>(intervals = @intervals) &#x21d2; Boolean </a>
170
-
171
-
172
-
173
- </span>
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
- <span class="summary_desc"><div class='inline'>
184
- <p>Was the button pressed twice?.</p>
185
- </div></span>
186
-
187
- </li>
188
-
189
-
190
- <li class="public ">
191
- <span class="summary_signature">
192
-
193
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(pin) &#x21d2; Button </a>
194
-
195
-
196
-
197
- </span>
198
-
199
-
200
- <span class="note title constructor">constructor</span>
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
- <span class="summary_desc"><div class='inline'>
210
- <p>A new instance of Button.</p>
211
- </div></span>
212
-
213
- </li>
214
-
215
-
216
- <li class="public ">
217
- <span class="summary_signature">
218
-
219
- <a href="#long_press%3F-instance_method" title="#long_press? (instance method)">#<strong>long_press?</strong>(intervals = @intervals) &#x21d2; Boolean </a>
220
-
221
-
222
-
223
- </span>
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
-
233
- <span class="summary_desc"><div class='inline'>
234
- <p>Was the button pressed for more than @long_click?.</p>
235
- </div></span>
236
-
237
- </li>
238
-
239
-
240
- <li class="public ">
241
- <span class="summary_signature">
242
-
243
- <a href="#not_pressed%3F-instance_method" title="#not_pressed? (instance method)">#<strong>not_pressed?</strong> &#x21d2; Boolean </a>
244
-
245
-
246
-
247
- </span>
248
-
249
-
250
-
251
-
252
-
253
-
254
-
255
-
256
-
257
- <span class="summary_desc"><div class='inline'>
258
- <p>Is button not being pressed?.</p>
259
- </div></span>
260
-
261
- </li>
262
-
263
-
264
- <li class="public ">
265
- <span class="summary_signature">
266
-
267
- <a href="#pressed%3F-instance_method" title="#pressed? (instance method)">#<strong>pressed?</strong> &#x21d2; Boolean </a>
268
-
269
-
270
-
271
- </span>
272
-
273
-
274
-
275
-
276
-
277
-
278
-
279
-
280
-
281
- <span class="summary_desc"><div class='inline'>
282
- <p>Is button being pressed?.</p>
283
- </div></span>
284
-
285
- </li>
286
-
287
-
288
- <li class="public ">
289
- <span class="summary_signature">
290
-
291
- <a href="#set_timeout-instance_method" title="#set_timeout (instance method)">#<strong>set_timeout</strong>(timeout) &#x21d2; Object </a>
292
-
293
-
294
-
295
- </span>
296
-
297
-
298
-
299
-
300
-
301
-
302
-
303
-
304
-
305
- <span class="summary_desc"><div class='inline'></div></span>
306
-
307
- </li>
308
-
309
-
310
- <li class="public ">
311
- <span class="summary_signature">
312
-
313
- <a href="#single_press%3F-instance_method" title="#single_press? (instance method)">#<strong>single_press?</strong>(intervals = @intervals) &#x21d2; Boolean </a>
314
-
315
-
316
-
317
- </span>
318
-
319
-
320
-
321
-
322
-
323
-
324
-
325
-
326
-
327
- <span class="summary_desc"><div class='inline'>
328
- <p>Was the button pressed once?.</p>
329
- </div></span>
330
-
331
- </li>
332
-
333
-
334
- <li class="public ">
335
- <span class="summary_signature">
336
-
337
- <a href="#timeout%3F-instance_method" title="#timeout? (instance method)">#<strong>timeout?</strong> &#x21d2; Boolean </a>
338
-
339
-
340
-
341
- </span>
342
-
343
-
344
-
345
-
346
-
347
-
348
-
349
-
350
-
351
- <span class="summary_desc"><div class='inline'></div></span>
352
-
353
- </li>
354
-
355
-
356
- <li class="public ">
357
- <span class="summary_signature">
358
-
359
- <a href="#triple_press%3F-instance_method" title="#triple_press? (instance method)">#<strong>triple_press?</strong>(intervals = @intervals) &#x21d2; Boolean </a>
360
-
361
-
362
-
363
- </span>
364
-
365
-
366
-
367
-
368
-
369
-
370
-
371
-
372
-
373
- <span class="summary_desc"><div class='inline'>
374
- <p>Was the button pressed 3 times?.</p>
375
- </div></span>
376
-
377
- </li>
378
-
379
-
380
- <li class="public ">
381
- <span class="summary_signature">
382
-
383
- <a href="#wait_for_press-instance_method" title="#wait_for_press (instance method)">#<strong>wait_for_press</strong> &#x21d2; Object </a>
384
-
385
-
386
-
387
- </span>
388
-
389
-
390
-
391
-
392
-
393
-
394
-
395
-
396
-
397
- <span class="summary_desc"><div class='inline'>
398
- <p>Wait for the 1st pressing of button.</p>
399
- </div></span>
400
-
401
- </li>
402
-
403
-
404
- <li class="public ">
405
- <span class="summary_signature">
406
-
407
- <a href="#wait_for_presses-instance_method" title="#wait_for_presses (instance method)">#<strong>wait_for_presses</strong>(attempts = 2, timeout = @timeout) &#x21d2; Object </a>
408
-
409
-
410
-
411
- </span>
412
-
413
-
414
-
415
-
416
-
417
-
418
-
419
-
420
-
421
- <span class="summary_desc"><div class='inline'>
422
- <p>Wait for several sequential presses.</p>
423
- </div></span>
424
-
425
- </li>
426
-
427
-
428
- <li class="public ">
429
- <span class="summary_signature">
430
-
431
- <a href="#was_not_pressed%3F-instance_method" title="#was_not_pressed? (instance method)">#<strong>was_not_pressed?</strong> &#x21d2; Boolean </a>
432
-
433
-
434
-
435
- </span>
436
-
437
-
438
-
439
-
440
-
441
-
442
-
443
-
444
-
445
- <span class="summary_desc"><div class='inline'></div></span>
446
-
447
- </li>
448
-
449
-
450
- <li class="public ">
451
- <span class="summary_signature">
452
-
453
- <a href="#was_pressed%3F-instance_method" title="#was_pressed? (instance method)">#<strong>was_pressed?</strong> &#x21d2; Boolean </a>
454
-
455
-
456
-
457
- </span>
458
-
459
-
460
-
461
-
462
-
463
-
464
-
465
-
466
-
467
- <span class="summary_desc"><div class='inline'></div></span>
468
-
469
- </li>
470
-
471
-
472
- </ul>
473
-
474
-
475
-
476
-
477
-
478
-
479
-
480
-
481
-
482
-
483
-
484
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="BinaryReceptor.html" title="BinaryReceptor (class)">BinaryReceptor</a></span></h3>
485
- <p class="inherited"><span class='object_link'><a href="BinaryReceptor.html#high%3F-instance_method" title="BinaryReceptor#high? (method)">#high?</a></span>, <span class='object_link'><a href="BinaryReceptor.html#low%3F-instance_method" title="BinaryReceptor#low? (method)">#low?</a></span></p>
486
-
487
-
488
-
489
-
490
-
491
-
492
-
493
-
494
-
495
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Receptor.html" title="Receptor (class)">Receptor</a></span></h3>
496
- <p class="inherited"><span class='object_link'><a href="Receptor.html#model_name-instance_method" title="Receptor#model_name (method)">#model_name</a></span>, <span class='object_link'><a href="Receptor.html#name-instance_method" title="Receptor#name (method)">#name</a></span></p>
497
- <div id="constructor_details" class="method_details_list">
498
- <h2>Constructor Details</h2>
499
-
500
- <div class="method_details first">
501
- <h3 class="signature first" id="initialize-instance_method">
502
-
503
- #<strong>initialize</strong>(pin) &#x21d2; <tt><span class='object_link'><a href="" title="Button (class)">Button</a></span></tt>
504
-
505
-
506
-
507
-
508
-
509
- </h3><div class="docstring">
510
- <div class="discussion">
511
-
512
- <p>Returns a new instance of Button</p>
513
-
514
-
515
- </div>
516
- </div>
517
- <div class="tags">
518
-
519
-
520
- </div><table class="source_code">
521
- <tr>
522
- <td>
523
- <pre class="lines">
524
-
525
-
526
- 7
527
- 8
528
- 9
529
- 10
530
- 11
531
- 12
532
- 13
533
- 14
534
- 15
535
- 16
536
- 17
537
- 18</pre>
538
- </td>
539
- <td>
540
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 7</span>
541
-
542
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='rparen'>)</span>
543
- <span class='id identifier rubyid_receptor_name'>receptor_name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>BUTTON</span><span class='tstring_end'>&#39;</span></span>
544
- <span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_pin'>pin</span><span class='rparen'>)</span>
545
- <span class='ivar'>@measure_pause</span> <span class='op'>=</span> <span class='float'>0.01</span>
546
- <span class='ivar'>@long_click</span> <span class='op'>=</span> <span class='float'>1.0</span>
547
- <span class='ivar'>@short_interval</span> <span class='op'>=</span> <span class='float'>0.2</span>
548
- <span class='ivar'>@timeout</span> <span class='op'>=</span> <span class='int'>30</span>
549
- <span class='ivar'>@intervals</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
550
- <span class='comment'># samples: wait time press time wait time press time
551
- </span> <span class='comment'># double press: [[1.486804292, 0.090814152], [0.131284967, 0.13125429]]
552
- </span> <span class='comment'># long press: [[0.910878286, 1.109352219]]
553
- </span><span class='kw'>end</span></pre>
554
- </td>
555
- </tr>
556
- </table>
557
- </div>
558
-
559
- </div>
560
-
561
- <div id="instance_attr_details" class="attr_details">
562
- <h2>Instance Attribute Details</h2>
563
-
564
-
565
- <span id=""></span>
566
- <div class="method_details first">
567
- <h3 class="signature first" id="measure_pause=-instance_method">
568
-
569
- #<strong>measure_pause=</strong>(value) &#x21d2; <tt>Object</tt> <span class="extras">(writeonly)</span>
570
-
571
-
572
-
573
-
574
-
575
- </h3><div class="docstring">
576
- <div class="discussion">
577
-
578
- <p>Sets the attribute measure_pause</p>
579
-
580
-
581
- </div>
582
- </div>
583
- <div class="tags">
584
- <p class="tag_title">Parameters:</p>
585
- <ul class="param">
586
-
587
- <li>
588
-
589
- <span class='name'>value</span>
590
-
591
-
592
- <span class='type'></span>
593
-
594
-
595
-
596
- &mdash;
597
- <div class='inline'>
598
- <p>the value to set the attribute measure_pause to.</p>
599
- </div>
600
-
601
- </li>
602
-
603
- </ul>
604
-
605
-
606
- </div><table class="source_code">
607
- <tr>
608
- <td>
609
- <pre class="lines">
610
-
611
-
612
- 5
613
- 6
614
- 7</pre>
615
- </td>
616
- <td>
617
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 5</span>
618
-
619
- <span class='kw'>def</span> <span class='id identifier rubyid_measure_pause='>measure_pause=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
620
- <span class='ivar'>@measure_pause</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
621
- <span class='kw'>end</span></pre>
622
- </td>
623
- </tr>
624
- </table>
625
- </div>
626
-
627
- </div>
628
-
629
-
630
- <div id="instance_method_details" class="method_details_list">
631
- <h2>Instance Method Details</h2>
632
-
633
-
634
- <div class="method_details first">
635
- <h3 class="signature first" id="double_press?-instance_method">
636
-
637
- #<strong>double_press?</strong>(intervals = @intervals) &#x21d2; <tt>Boolean</tt>
638
-
639
-
640
-
641
-
642
-
643
- </h3><div class="docstring">
644
- <div class="discussion">
645
-
646
- <p>Was the button pressed twice?</p>
647
-
648
-
649
- </div>
650
- </div>
651
- <div class="tags">
652
-
653
- <p class="tag_title">Returns:</p>
654
- <ul class="return">
655
-
656
- <li>
657
-
658
-
659
- <span class='type'>(<tt>Boolean</tt>)</span>
660
-
661
-
662
-
663
- </li>
664
-
665
- </ul>
666
-
667
- </div><table class="source_code">
668
- <tr>
669
- <td>
670
- <pre class="lines">
671
-
672
-
673
- 69
674
- 70
675
- 71</pre>
676
- </td>
677
- <td>
678
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 69</span>
679
-
680
- <span class='kw'>def</span> <span class='id identifier rubyid_double_press?'>double_press?</span><span class='lparen'>(</span><span class='id identifier rubyid_intervals'>intervals</span><span class='op'>=</span><span class='ivar'>@intervals</span><span class='rparen'>)</span>
681
- <span class='id identifier rubyid_intervals'>intervals</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>2</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_intervals'>intervals</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>&lt;=</span> <span class='ivar'>@short_interval</span>
682
- <span class='kw'>end</span></pre>
683
- </td>
684
- </tr>
685
- </table>
686
- </div>
687
-
688
- <div class="method_details ">
689
- <h3 class="signature " id="long_press?-instance_method">
690
-
691
- #<strong>long_press?</strong>(intervals = @intervals) &#x21d2; <tt>Boolean</tt>
692
-
693
-
694
-
695
-
696
-
697
- </h3><div class="docstring">
698
- <div class="discussion">
699
-
700
- <p>Was the button pressed for more than @long_click?</p>
701
-
702
-
703
- </div>
704
- </div>
705
- <div class="tags">
706
-
707
- <p class="tag_title">Returns:</p>
708
- <ul class="return">
709
-
710
- <li>
711
-
712
-
713
- <span class='type'>(<tt>Boolean</tt>)</span>
714
-
715
-
716
-
717
- </li>
718
-
719
- </ul>
720
-
721
- </div><table class="source_code">
722
- <tr>
723
- <td>
724
- <pre class="lines">
725
-
726
-
727
- 79
728
- 80
729
- 81</pre>
730
- </td>
731
- <td>
732
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 79</span>
733
-
734
- <span class='kw'>def</span> <span class='id identifier rubyid_long_press?'>long_press?</span><span class='lparen'>(</span><span class='id identifier rubyid_intervals'>intervals</span><span class='op'>=</span><span class='ivar'>@intervals</span><span class='rparen'>)</span>
735
- <span class='id identifier rubyid_intervals'>intervals</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_intervals'>intervals</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>&gt;=</span> <span class='ivar'>@long_click</span>
736
- <span class='kw'>end</span></pre>
737
- </td>
738
- </tr>
739
- </table>
740
- </div>
741
-
742
- <div class="method_details ">
743
- <h3 class="signature " id="not_pressed?-instance_method">
744
-
745
- #<strong>not_pressed?</strong> &#x21d2; <tt>Boolean</tt>
746
-
747
-
748
-
749
-
750
-
751
- </h3><div class="docstring">
752
- <div class="discussion">
753
-
754
- <p>Is button not being pressed?</p>
755
-
756
-
757
- </div>
758
- </div>
759
- <div class="tags">
760
-
761
- <p class="tag_title">Returns:</p>
762
- <ul class="return">
763
-
764
- <li>
765
-
766
-
767
- <span class='type'>(<tt>Boolean</tt>)</span>
768
-
769
-
770
-
771
- </li>
772
-
773
- </ul>
774
-
775
- </div><table class="source_code">
776
- <tr>
777
- <td>
778
- <pre class="lines">
779
-
780
-
781
- 26
782
- 27
783
- 28</pre>
784
- </td>
785
- <td>
786
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 26</span>
787
-
788
- <span class='kw'>def</span> <span class='id identifier rubyid_not_pressed?'>not_pressed?</span>
789
- <span class='id identifier rubyid_high?'>high?</span>
790
- <span class='kw'>end</span></pre>
791
- </td>
792
- </tr>
793
- </table>
794
- </div>
795
-
796
- <div class="method_details ">
797
- <h3 class="signature " id="pressed?-instance_method">
798
-
799
- #<strong>pressed?</strong> &#x21d2; <tt>Boolean</tt>
800
-
801
-
802
-
803
-
804
-
805
- </h3><div class="docstring">
806
- <div class="discussion">
807
-
808
- <p>Is button being pressed?</p>
809
-
810
-
811
- </div>
812
- </div>
813
- <div class="tags">
814
-
815
- <p class="tag_title">Returns:</p>
816
- <ul class="return">
817
-
818
- <li>
819
-
820
-
821
- <span class='type'>(<tt>Boolean</tt>)</span>
822
-
823
-
824
-
825
- </li>
826
-
827
- </ul>
828
-
829
- </div><table class="source_code">
830
- <tr>
831
- <td>
832
- <pre class="lines">
833
-
834
-
835
- 21
836
- 22
837
- 23</pre>
838
- </td>
839
- <td>
840
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 21</span>
841
-
842
- <span class='kw'>def</span> <span class='id identifier rubyid_pressed?'>pressed?</span>
843
- <span class='id identifier rubyid_low?'>low?</span>
844
- <span class='kw'>end</span></pre>
845
- </td>
846
- </tr>
847
- </table>
848
- </div>
849
-
850
- <div class="method_details ">
851
- <h3 class="signature " id="set_timeout-instance_method">
852
-
853
- #<strong>set_timeout</strong>(timeout) &#x21d2; <tt>Object</tt>
854
-
855
-
856
-
857
-
858
-
859
- </h3><table class="source_code">
860
- <tr>
861
- <td>
862
- <pre class="lines">
863
-
864
-
865
- 83
866
- 84
867
- 85</pre>
868
- </td>
869
- <td>
870
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 83</span>
871
-
872
- <span class='kw'>def</span> <span class='id identifier rubyid_set_timeout'>set_timeout</span><span class='lparen'>(</span><span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span>
873
- <span class='ivar'>@timeout</span> <span class='op'>=</span> <span class='id identifier rubyid_timeout'>timeout</span>
874
- <span class='kw'>end</span></pre>
875
- </td>
876
- </tr>
877
- </table>
878
- </div>
879
-
880
- <div class="method_details ">
881
- <h3 class="signature " id="single_press?-instance_method">
882
-
883
- #<strong>single_press?</strong>(intervals = @intervals) &#x21d2; <tt>Boolean</tt>
884
-
885
-
886
-
887
-
888
-
889
- </h3><div class="docstring">
890
- <div class="discussion">
891
-
892
- <p>Was the button pressed once?</p>
893
-
894
-
895
- </div>
896
- </div>
897
- <div class="tags">
898
-
899
- <p class="tag_title">Returns:</p>
900
- <ul class="return">
901
-
902
- <li>
903
-
904
-
905
- <span class='type'>(<tt>Boolean</tt>)</span>
906
-
907
-
908
-
909
- </li>
910
-
911
- </ul>
912
-
913
- </div><table class="source_code">
914
- <tr>
915
- <td>
916
- <pre class="lines">
917
-
918
-
919
- 64
920
- 65
921
- 66</pre>
922
- </td>
923
- <td>
924
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 64</span>
925
-
926
- <span class='kw'>def</span> <span class='id identifier rubyid_single_press?'>single_press?</span><span class='lparen'>(</span><span class='id identifier rubyid_intervals'>intervals</span><span class='op'>=</span><span class='ivar'>@intervals</span><span class='rparen'>)</span>
927
- <span class='id identifier rubyid_intervals'>intervals</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span>
928
- <span class='kw'>end</span></pre>
929
- </td>
930
- </tr>
931
- </table>
932
- </div>
933
-
934
- <div class="method_details ">
935
- <h3 class="signature " id="timeout?-instance_method">
936
-
937
- #<strong>timeout?</strong> &#x21d2; <tt>Boolean</tt>
938
-
939
-
940
-
941
-
942
-
943
- </h3><div class="docstring">
944
- <div class="discussion">
945
-
946
-
947
- </div>
948
- </div>
949
- <div class="tags">
950
-
951
- <p class="tag_title">Returns:</p>
952
- <ul class="return">
953
-
954
- <li>
955
-
956
-
957
- <span class='type'>(<tt>Boolean</tt>)</span>
958
-
959
-
960
-
961
- </li>
962
-
963
- </ul>
964
-
965
- </div><table class="source_code">
966
- <tr>
967
- <td>
968
- <pre class="lines">
969
-
970
-
971
- 87
972
- 88
973
- 89
974
- 90
975
- 91
976
- 92
977
- 93</pre>
978
- </td>
979
- <td>
980
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 87</span>
981
-
982
- <span class='kw'>def</span> <span class='id identifier rubyid_timeout?'>timeout?</span>
983
- <span class='id identifier rubyid_min_wait_time'>min_wait_time</span> <span class='op'>=</span> <span class='float'>0.0</span>
984
- <span class='ivar'>@intervals</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_interval'>interval</span><span class='op'>|</span>
985
- <span class='id identifier rubyid_min_wait_time'>min_wait_time</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='id identifier rubyid_min_wait_time'>min_wait_time</span><span class='comma'>,</span> <span class='id identifier rubyid_interval'>interval</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_min'>min</span>
986
- <span class='kw'>end</span>
987
- <span class='id identifier rubyid_min_wait_time'>min_wait_time</span> <span class='op'>&gt;</span> <span class='ivar'>@timeout</span>
988
- <span class='kw'>end</span></pre>
989
- </td>
990
- </tr>
991
- </table>
992
- </div>
993
-
994
- <div class="method_details ">
995
- <h3 class="signature " id="triple_press?-instance_method">
996
-
997
- #<strong>triple_press?</strong>(intervals = @intervals) &#x21d2; <tt>Boolean</tt>
998
-
999
-
1000
-
1001
-
1002
-
1003
- </h3><div class="docstring">
1004
- <div class="discussion">
1005
-
1006
- <p>Was the button pressed 3 times?</p>
1007
-
1008
-
1009
- </div>
1010
- </div>
1011
- <div class="tags">
1012
-
1013
- <p class="tag_title">Returns:</p>
1014
- <ul class="return">
1015
-
1016
- <li>
1017
-
1018
-
1019
- <span class='type'>(<tt>Boolean</tt>)</span>
1020
-
1021
-
1022
-
1023
- </li>
1024
-
1025
- </ul>
1026
-
1027
- </div><table class="source_code">
1028
- <tr>
1029
- <td>
1030
- <pre class="lines">
1031
-
1032
-
1033
- 74
1034
- 75
1035
- 76</pre>
1036
- </td>
1037
- <td>
1038
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 74</span>
1039
-
1040
- <span class='kw'>def</span> <span class='id identifier rubyid_triple_press?'>triple_press?</span><span class='lparen'>(</span><span class='id identifier rubyid_intervals'>intervals</span><span class='op'>=</span><span class='ivar'>@intervals</span><span class='rparen'>)</span>
1041
- <span class='id identifier rubyid_intervals'>intervals</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>3</span>
1042
- <span class='kw'>end</span></pre>
1043
- </td>
1044
- </tr>
1045
- </table>
1046
- </div>
1047
-
1048
- <div class="method_details ">
1049
- <h3 class="signature " id="wait_for_press-instance_method">
1050
-
1051
- #<strong>wait_for_press</strong> &#x21d2; <tt>Object</tt>
1052
-
1053
-
1054
-
1055
-
1056
-
1057
- </h3><div class="docstring">
1058
- <div class="discussion">
1059
-
1060
- <p>Wait for the 1st pressing of button</p>
1061
-
1062
-
1063
- </div>
1064
- </div>
1065
- <div class="tags">
1066
-
1067
-
1068
- </div><table class="source_code">
1069
- <tr>
1070
- <td>
1071
- <pre class="lines">
1072
-
1073
-
1074
- 39
1075
- 40
1076
- 41</pre>
1077
- </td>
1078
- <td>
1079
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 39</span>
1080
-
1081
- <span class='kw'>def</span> <span class='id identifier rubyid_wait_for_press'>wait_for_press</span>
1082
- <span class='id identifier rubyid_wait_for_presses'>wait_for_presses</span><span class='lparen'>(</span><span class='int'>1</span><span class='rparen'>)</span>
1083
- <span class='kw'>end</span></pre>
1084
- </td>
1085
- </tr>
1086
- </table>
1087
- </div>
1088
-
1089
- <div class="method_details ">
1090
- <h3 class="signature " id="wait_for_presses-instance_method">
1091
-
1092
- #<strong>wait_for_presses</strong>(attempts = 2, timeout = @timeout) &#x21d2; <tt>Object</tt>
1093
-
1094
-
1095
-
1096
-
1097
-
1098
- </h3><div class="docstring">
1099
- <div class="discussion">
1100
-
1101
- <p>Wait for several sequential presses</p>
1102
-
1103
-
1104
- </div>
1105
- </div>
1106
- <div class="tags">
1107
-
1108
-
1109
- </div><table class="source_code">
1110
- <tr>
1111
- <td>
1112
- <pre class="lines">
1113
-
1114
-
1115
- 44
1116
- 45
1117
- 46
1118
- 47
1119
- 48
1120
- 49
1121
- 50
1122
- 51
1123
- 52
1124
- 53
1125
- 54
1126
- 55
1127
- 56
1128
- 57
1129
- 58
1130
- 59
1131
- 60
1132
- 61</pre>
1133
- </td>
1134
- <td>
1135
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 44</span>
1136
-
1137
- <span class='kw'>def</span> <span class='id identifier rubyid_wait_for_presses'>wait_for_presses</span><span class='lparen'>(</span><span class='id identifier rubyid_attempts'>attempts</span><span class='op'>=</span><span class='int'>2</span><span class='comma'>,</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='op'>=</span><span class='ivar'>@timeout</span><span class='rparen'>)</span>
1138
- <span class='ivar'>@intervals</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1139
- <span class='id identifier rubyid_attempts'>attempts</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span>
1140
- <span class='id identifier rubyid_interval'>interval</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1141
- <span class='id identifier rubyid_timer'>timer</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
1142
- <span class='kw'>while</span> <span class='id identifier rubyid_not_pressed?'>not_pressed?</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='op'>-</span><span class='id identifier rubyid_timer'>timer</span><span class='rparen'>)</span> <span class='op'>&lt;</span> <span class='id identifier rubyid_timeout'>timeout</span> <span class='kw'>do</span>
1143
- <span class='id identifier rubyid_sleep'>sleep</span> <span class='ivar'>@measure_pause</span>
1144
- <span class='kw'>end</span>
1145
- <span class='id identifier rubyid_interval'>interval</span> <span class='op'>&lt;&lt;</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='op'>-</span><span class='id identifier rubyid_timer'>timer</span>
1146
- <span class='id identifier rubyid_timer'>timer</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
1147
- <span class='kw'>while</span> <span class='id identifier rubyid_pressed?'>pressed?</span> <span class='kw'>do</span>
1148
- <span class='id identifier rubyid_sleep'>sleep</span> <span class='ivar'>@measure_pause</span>
1149
- <span class='kw'>end</span>
1150
- <span class='id identifier rubyid_interval'>interval</span> <span class='op'>&lt;&lt;</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span><span class='op'>-</span><span class='id identifier rubyid_timer'>timer</span>
1151
- <span class='ivar'>@intervals</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_interval'>interval</span>
1152
- <span class='kw'>end</span>
1153
- <span class='ivar'>@intervals</span>
1154
- <span class='kw'>end</span></pre>
1155
- </td>
1156
- </tr>
1157
- </table>
1158
- </div>
1159
-
1160
- <div class="method_details ">
1161
- <h3 class="signature " id="was_not_pressed?-instance_method">
1162
-
1163
- #<strong>was_not_pressed?</strong> &#x21d2; <tt>Boolean</tt>
1164
-
1165
-
1166
-
1167
-
1168
-
1169
- </h3><div class="docstring">
1170
- <div class="discussion">
1171
-
1172
-
1173
- </div>
1174
- </div>
1175
- <div class="tags">
1176
-
1177
- <p class="tag_title">Returns:</p>
1178
- <ul class="return">
1179
-
1180
- <li>
1181
-
1182
-
1183
- <span class='type'>(<tt>Boolean</tt>)</span>
1184
-
1185
-
1186
-
1187
- </li>
1188
-
1189
- </ul>
1190
-
1191
- </div><table class="source_code">
1192
- <tr>
1193
- <td>
1194
- <pre class="lines">
1195
-
1196
-
1197
- 34
1198
- 35
1199
- 36</pre>
1200
- </td>
1201
- <td>
1202
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 34</span>
1203
-
1204
- <span class='kw'>def</span> <span class='id identifier rubyid_was_not_pressed?'>was_not_pressed?</span>
1205
- <span class='op'>!</span><span class='id identifier rubyid_was_pressed?'>was_pressed?</span>
1206
- <span class='kw'>end</span></pre>
1207
- </td>
1208
- </tr>
1209
- </table>
1210
- </div>
1211
-
1212
- <div class="method_details ">
1213
- <h3 class="signature " id="was_pressed?-instance_method">
1214
-
1215
- #<strong>was_pressed?</strong> &#x21d2; <tt>Boolean</tt>
1216
-
1217
-
1218
-
1219
-
1220
-
1221
- </h3><div class="docstring">
1222
- <div class="discussion">
1223
-
1224
-
1225
- </div>
1226
- </div>
1227
- <div class="tags">
1228
-
1229
- <p class="tag_title">Returns:</p>
1230
- <ul class="return">
1231
-
1232
- <li>
1233
-
1234
-
1235
- <span class='type'>(<tt>Boolean</tt>)</span>
1236
-
1237
-
1238
-
1239
- </li>
1240
-
1241
- </ul>
1242
-
1243
- </div><table class="source_code">
1244
- <tr>
1245
- <td>
1246
- <pre class="lines">
1247
-
1248
-
1249
- 30
1250
- 31
1251
- 32</pre>
1252
- </td>
1253
- <td>
1254
- <pre class="code"><span class="info file"># File 'lib/button.rb', line 30</span>
1255
-
1256
- <span class='kw'>def</span> <span class='id identifier rubyid_was_pressed?'>was_pressed?</span>
1257
- <span class='ivar'>@intervals</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
1258
- <span class='kw'>end</span></pre>
1259
- </td>
1260
- </tr>
1261
- </table>
1262
- </div>
1263
-
1264
- </div>
1265
-
1266
- </div>
1267
-
1268
- <div id="footer">
1269
- Generated on Wed Dec 26 18:10:07 2018 by
1270
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1271
- 0.9.16 (ruby-2.3.3).
1272
- </div>
1273
-
1274
- </div>
1275
- </body>
1276
- </html>