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,257 +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: Receptor
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 = "Receptor";
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 (R)</a> &raquo;
40
-
41
-
42
- <span class="title">Receptor</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: Receptor
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">Receptor</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- <dl>
96
- <dt>Defined in:</dt>
97
- <dd>lib/receptor.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>Receptor - physical device that can provide info about real world</p>
106
-
107
-
108
- </div>
109
- </div>
110
- <div class="tags">
111
-
112
-
113
- </div><div id="subclasses">
114
- <h2>Direct Known Subclasses</h2>
115
- <p class="children"><span class='object_link'><a href="BinaryReceptor.html" title="BinaryReceptor (class)">BinaryReceptor</a></span>, <span class='object_link'><a href="DigitalReceptor.html" title="DigitalReceptor (class)">DigitalReceptor</a></span>, <span class='object_link'><a href="Sensor.html" title="Sensor (class)">Sensor</a></span></p>
116
- </div>
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
- <h2>
126
- Instance Method Summary
127
- <small><a href="#" class="summary_toggle">collapse</a></small>
128
- </h2>
129
-
130
- <ul class="summary">
131
-
132
- <li class="public ">
133
- <span class="summary_signature">
134
-
135
- <a href="#model_name-instance_method" title="#model_name (instance method)">#<strong>model_name</strong> &#x21d2; Object </a>
136
-
137
-
138
-
139
- </span>
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
-
149
- <span class="summary_desc"><div class='inline'></div></span>
150
-
151
- </li>
152
-
153
-
154
- <li class="public ">
155
- <span class="summary_signature">
156
-
157
- <a href="#name-instance_method" title="#name (instance method)">#<strong>name</strong> &#x21d2; Object </a>
158
-
159
-
160
-
161
- </span>
162
-
163
-
164
-
165
-
166
-
167
-
168
-
169
-
170
-
171
- <span class="summary_desc"><div class='inline'></div></span>
172
-
173
- </li>
174
-
175
-
176
- </ul>
177
-
178
-
179
-
180
-
181
- <div id="instance_method_details" class="method_details_list">
182
- <h2>Instance Method Details</h2>
183
-
184
-
185
- <div class="method_details first">
186
- <h3 class="signature first" id="model_name-instance_method">
187
-
188
- #<strong>model_name</strong> &#x21d2; <tt>Object</tt>
189
-
190
-
191
-
192
-
193
-
194
- </h3><table class="source_code">
195
- <tr>
196
- <td>
197
- <pre class="lines">
198
-
199
-
200
- 16
201
- 17
202
- 18</pre>
203
- </td>
204
- <td>
205
- <pre class="code"><span class="info file"># File 'lib/receptor.rb', line 16</span>
206
-
207
- <span class='kw'>def</span> <span class='id identifier rubyid_model_name'>model_name</span>
208
- <span class='ivar'>@model</span>
209
- <span class='kw'>end</span></pre>
210
- </td>
211
- </tr>
212
- </table>
213
- </div>
214
-
215
- <div class="method_details ">
216
- <h3 class="signature " id="name-instance_method">
217
-
218
- #<strong>name</strong> &#x21d2; <tt>Object</tt>
219
-
220
-
221
-
222
-
223
-
224
- </h3><table class="source_code">
225
- <tr>
226
- <td>
227
- <pre class="lines">
228
-
229
-
230
- 12
231
- 13
232
- 14</pre>
233
- </td>
234
- <td>
235
- <pre class="code"><span class="info file"># File 'lib/receptor.rb', line 12</span>
236
-
237
- <span class='kw'>def</span> <span class='id identifier rubyid_name'>name</span>
238
- <span class='ivar'>@name</span>
239
- <span class='kw'>end</span></pre>
240
- </td>
241
- </tr>
242
- </table>
243
- </div>
244
-
245
- </div>
246
-
247
- </div>
248
-
249
- <div id="footer">
250
- Generated on Wed Dec 26 18:10:15 2018 by
251
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
252
- 0.9.16 (ruby-2.3.3).
253
- </div>
254
-
255
- </div>
256
- </body>
257
- </html>
@@ -1,145 +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: Sensor
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 = "Sensor";
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 (S)</a> &raquo;
40
-
41
-
42
- <span class="title">Sensor</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: Sensor
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="Receptor.html" title="Receptor (class)">Receptor</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">Sensor</li>
80
-
81
- </ul>
82
- <a href="#" class="inheritanceTree">show all</a>
83
-
84
- </dd>
85
- </dl>
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
- <dl>
98
- <dt>Defined in:</dt>
99
- <dd>lib/receptor.rb</dd>
100
- </dl>
101
-
102
- </div>
103
-
104
- <h2>Overview</h2><div class="docstring">
105
- <div class="discussion">
106
-
107
- <p>Sensor - a synonym for Receptor</p>
108
-
109
-
110
- </div>
111
- </div>
112
- <div class="tags">
113
-
114
-
115
- </div>
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
- <h2>Method Summary</h2>
130
-
131
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Receptor.html" title="Receptor (class)">Receptor</a></span></h3>
132
- <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>
133
-
134
-
135
- </div>
136
-
137
- <div id="footer">
138
- Generated on Wed Dec 26 18:10:15 2018 by
139
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
140
- 0.9.16 (ruby-2.3.3).
141
- </div>
142
-
143
- </div>
144
- </body>
145
- </html>
@@ -1,644 +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: TemperatureSensor
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 = "TemperatureSensor";
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> &raquo;
40
-
41
-
42
- <span class="title">TemperatureSensor</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: TemperatureSensor
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="DigitalSensor.html" title="DigitalSensor (class)">DigitalSensor</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="DigitalReceptor.html" title="DigitalReceptor (class)">DigitalReceptor</a></span></li>
80
-
81
- <li class="next"><span class='object_link'><a href="DigitalSensor.html" title="DigitalSensor (class)">DigitalSensor</a></span></li>
82
-
83
- <li class="next">TemperatureSensor</li>
84
-
85
- </ul>
86
- <a href="#" class="inheritanceTree">show all</a>
87
-
88
- </dd>
89
- </dl>
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
- <dl>
102
- <dt>Defined in:</dt>
103
- <dd>lib/temperature_sensor.rb</dd>
104
- </dl>
105
-
106
- </div>
107
-
108
- <h2>Overview</h2><div class="docstring">
109
- <div class="discussion">
110
-
111
- <p>TemperatureSensor - temperature sensing receptor</p>
112
-
113
-
114
- </div>
115
- </div>
116
- <div class="tags">
117
-
118
-
119
- </div><div id="subclasses">
120
- <h2>Direct Known Subclasses</h2>
121
- <p class="children"><span class='object_link'><a href="DS18B20.html" title="DS18B20 (class)">DS18B20</a></span>, <span class='object_link'><a href="HumitureSensor.html" title="HumitureSensor (class)">HumitureSensor</a></span>, <span class='object_link'><a href="RaspberryPi/ThermalSensor.html" title="RaspberryPi::ThermalSensor (class)">RaspberryPi::ThermalSensor</a></span></p>
122
- </div>
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
- <h2>
132
- Instance Method Summary
133
- <small><a href="#" class="summary_toggle">collapse</a></small>
134
- </h2>
135
-
136
- <ul class="summary">
137
-
138
- <li class="public ">
139
- <span class="summary_signature">
140
-
141
- <a href="#celsius-instance_method" title="#celsius (instance method)">#<strong>celsius</strong> &#x21d2; Object </a>
142
-
143
-
144
-
145
- </span>
146
-
147
-
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
- <span class="summary_desc"><div class='inline'></div></span>
156
-
157
- </li>
158
-
159
-
160
- <li class="public ">
161
- <span class="summary_signature">
162
-
163
- <a href="#fahrenheit-instance_method" title="#fahrenheit (instance method)">#<strong>fahrenheit</strong> &#x21d2; Object </a>
164
-
165
-
166
-
167
- </span>
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
- <span class="summary_desc"><div class='inline'></div></span>
178
-
179
- </li>
180
-
181
-
182
- <li class="public ">
183
- <span class="summary_signature">
184
-
185
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong> &#x21d2; TemperatureSensor </a>
186
-
187
-
188
-
189
- </span>
190
-
191
-
192
- <span class="note title constructor">constructor</span>
193
-
194
-
195
-
196
-
197
-
198
-
199
-
200
-
201
- <span class="summary_desc"><div class='inline'>
202
- <p>A new instance of TemperatureSensor.</p>
203
- </div></span>
204
-
205
- </li>
206
-
207
-
208
- <li class="public ">
209
- <span class="summary_signature">
210
-
211
- <a href="#kelvin-instance_method" title="#kelvin (instance method)">#<strong>kelvin</strong> &#x21d2; Object </a>
212
-
213
-
214
-
215
- </span>
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
-
224
-
225
- <span class="summary_desc"><div class='inline'></div></span>
226
-
227
- </li>
228
-
229
-
230
- <li class="public ">
231
- <span class="summary_signature">
232
-
233
- <a href="#read_data-instance_method" title="#read_data (instance method)">#<strong>read_data</strong> &#x21d2; Object </a>
234
-
235
-
236
-
237
- </span>
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
-
246
-
247
- <span class="summary_desc"><div class='inline'></div></span>
248
-
249
- </li>
250
-
251
-
252
- <li class="public ">
253
- <span class="summary_signature">
254
-
255
- <a href="#reaumur-instance_method" title="#reaumur (instance method)">#<strong>reaumur</strong> &#x21d2; Object </a>
256
-
257
-
258
-
259
- </span>
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
-
268
-
269
- <span class="summary_desc"><div class='inline'></div></span>
270
-
271
- </li>
272
-
273
-
274
- <li class="public ">
275
- <span class="summary_signature">
276
-
277
- <a href="#temperature-instance_method" title="#temperature (instance method)">#<strong>temperature</strong>(mode = :celsius) &#x21d2; Object </a>
278
-
279
-
280
-
281
- </span>
282
-
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
-
291
- <span class="summary_desc"><div class='inline'></div></span>
292
-
293
- </li>
294
-
295
-
296
- <li class="public ">
297
- <span class="summary_signature">
298
-
299
- <a href="#to_s-instance_method" title="#to_s (instance method)">#<strong>to_s</strong> &#x21d2; Object </a>
300
-
301
-
302
-
303
- </span>
304
-
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
- <span class="summary_desc"><div class='inline'></div></span>
314
-
315
- </li>
316
-
317
-
318
- </ul>
319
-
320
-
321
-
322
-
323
-
324
-
325
-
326
-
327
-
328
-
329
-
330
-
331
-
332
-
333
-
334
-
335
-
336
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="DigitalReceptor.html" title="DigitalReceptor (class)">DigitalReceptor</a></span></h3>
337
- <p class="inherited"><span class='object_link'><a href="DigitalReceptor.html#one_wire_file-class_method" title="DigitalReceptor.one_wire_file (method)">one_wire_file</a></span></p>
338
-
339
-
340
-
341
-
342
-
343
-
344
-
345
-
346
-
347
- <h3 class="inherited">Methods inherited from <span class='object_link'><a href="Receptor.html" title="Receptor (class)">Receptor</a></span></h3>
348
- <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>
349
- <div id="constructor_details" class="method_details_list">
350
- <h2>Constructor Details</h2>
351
-
352
- <div class="method_details first">
353
- <h3 class="signature first" id="initialize-instance_method">
354
-
355
- #<strong>initialize</strong> &#x21d2; <tt><span class='object_link'><a href="" title="TemperatureSensor (class)">TemperatureSensor</a></span></tt>
356
-
357
-
358
-
359
-
360
-
361
- </h3><div class="docstring">
362
- <div class="discussion">
363
-
364
- <p>Returns a new instance of TemperatureSensor</p>
365
-
366
-
367
- </div>
368
- </div>
369
- <div class="tags">
370
-
371
-
372
- </div><table class="source_code">
373
- <tr>
374
- <td>
375
- <pre class="lines">
376
-
377
-
378
- 7
379
- 8
380
- 9</pre>
381
- </td>
382
- <td>
383
- <pre class="code"><span class="info file"># File 'lib/temperature_sensor.rb', line 7</span>
384
-
385
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span>
386
- <span class='ivar'>@temperature</span> <span class='op'>=</span> <span class='id identifier rubyid_read_data'>read_data</span>
387
- <span class='kw'>end</span></pre>
388
- </td>
389
- </tr>
390
- </table>
391
- </div>
392
-
393
- </div>
394
-
395
-
396
- <div id="instance_method_details" class="method_details_list">
397
- <h2>Instance Method Details</h2>
398
-
399
-
400
- <div class="method_details first">
401
- <h3 class="signature first" id="celsius-instance_method">
402
-
403
- #<strong>celsius</strong> &#x21d2; <tt>Object</tt>
404
-
405
-
406
-
407
-
408
-
409
- </h3><table class="source_code">
410
- <tr>
411
- <td>
412
- <pre class="lines">
413
-
414
-
415
- 14
416
- 15
417
- 16</pre>
418
- </td>
419
- <td>
420
- <pre class="code"><span class="info file"># File 'lib/temperature_sensor.rb', line 14</span>
421
-
422
- <span class='kw'>def</span> <span class='id identifier rubyid_celsius'>celsius</span>
423
- <span class='ivar'>@temperature</span>
424
- <span class='kw'>end</span></pre>
425
- </td>
426
- </tr>
427
- </table>
428
- </div>
429
-
430
- <div class="method_details ">
431
- <h3 class="signature " id="fahrenheit-instance_method">
432
-
433
- #<strong>fahrenheit</strong> &#x21d2; <tt>Object</tt>
434
-
435
-
436
-
437
-
438
-
439
- </h3><table class="source_code">
440
- <tr>
441
- <td>
442
- <pre class="lines">
443
-
444
-
445
- 18
446
- 19
447
- 20</pre>
448
- </td>
449
- <td>
450
- <pre class="code"><span class="info file"># File 'lib/temperature_sensor.rb', line 18</span>
451
-
452
- <span class='kw'>def</span> <span class='id identifier rubyid_fahrenheit'>fahrenheit</span>
453
- <span class='ivar'>@temperature</span> <span class='op'>*</span> <span class='float'>9.0</span> <span class='op'>/</span> <span class='float'>5.0</span> <span class='op'>+</span> <span class='int'>32</span>
454
- <span class='kw'>end</span></pre>
455
- </td>
456
- </tr>
457
- </table>
458
- </div>
459
-
460
- <div class="method_details ">
461
- <h3 class="signature " id="kelvin-instance_method">
462
-
463
- #<strong>kelvin</strong> &#x21d2; <tt>Object</tt>
464
-
465
-
466
-
467
-
468
-
469
- </h3><table class="source_code">
470
- <tr>
471
- <td>
472
- <pre class="lines">
473
-
474
-
475
- 22
476
- 23
477
- 24</pre>
478
- </td>
479
- <td>
480
- <pre class="code"><span class="info file"># File 'lib/temperature_sensor.rb', line 22</span>
481
-
482
- <span class='kw'>def</span> <span class='id identifier rubyid_kelvin'>kelvin</span>
483
- <span class='ivar'>@temperature</span> <span class='op'>+</span> <span class='float'>273.15</span>
484
- <span class='kw'>end</span></pre>
485
- </td>
486
- </tr>
487
- </table>
488
- </div>
489
-
490
- <div class="method_details ">
491
- <h3 class="signature " id="read_data-instance_method">
492
-
493
- #<strong>read_data</strong> &#x21d2; <tt>Object</tt>
494
-
495
-
496
-
497
-
498
-
499
- </h3><table class="source_code">
500
- <tr>
501
- <td>
502
- <pre class="lines">
503
-
504
-
505
- 11
506
- 12
507
- 13</pre>
508
- </td>
509
- <td>
510
- <pre class="code"><span class="info file"># File 'lib/temperature_sensor.rb', line 11</span>
511
-
512
- <span class='kw'>def</span> <span class='id identifier rubyid_read_data'>read_data</span>
513
- <span class='ivar'>@temperature</span>
514
- <span class='kw'>end</span></pre>
515
- </td>
516
- </tr>
517
- </table>
518
- </div>
519
-
520
- <div class="method_details ">
521
- <h3 class="signature " id="reaumur-instance_method">
522
-
523
- #<strong>reaumur</strong> &#x21d2; <tt>Object</tt>
524
-
525
-
526
-
527
-
528
-
529
- </h3><table class="source_code">
530
- <tr>
531
- <td>
532
- <pre class="lines">
533
-
534
-
535
- 26
536
- 27
537
- 28</pre>
538
- </td>
539
- <td>
540
- <pre class="code"><span class="info file"># File 'lib/temperature_sensor.rb', line 26</span>
541
-
542
- <span class='kw'>def</span> <span class='id identifier rubyid_reaumur'>reaumur</span>
543
- <span class='ivar'>@temperature</span> <span class='op'>*</span> <span class='float'>0.8</span>
544
- <span class='kw'>end</span></pre>
545
- </td>
546
- </tr>
547
- </table>
548
- </div>
549
-
550
- <div class="method_details ">
551
- <h3 class="signature " id="temperature-instance_method">
552
-
553
- #<strong>temperature</strong>(mode = :celsius) &#x21d2; <tt>Object</tt>
554
-
555
-
556
-
557
-
558
-
559
- </h3><table class="source_code">
560
- <tr>
561
- <td>
562
- <pre class="lines">
563
-
564
-
565
- 34
566
- 35
567
- 36
568
- 37
569
- 38
570
- 39
571
- 40
572
- 41
573
- 42
574
- 43
575
- 44
576
- 45
577
- 46
578
- 47</pre>
579
- </td>
580
- <td>
581
- <pre class="code"><span class="info file"># File 'lib/temperature_sensor.rb', line 34</span>
582
-
583
- <span class='kw'>def</span> <span class='id identifier rubyid_temperature'>temperature</span><span class='lparen'>(</span><span class='id identifier rubyid_mode'>mode</span><span class='op'>=</span><span class='symbol'>:celsius</span><span class='rparen'>)</span>
584
- <span class='kw'>case</span> <span class='id identifier rubyid_mode'>mode</span>
585
- <span class='kw'>when</span> <span class='symbol'>:celsius</span>
586
- <span class='id identifier rubyid_celsius'>celsius</span>
587
- <span class='kw'>when</span> <span class='symbol'>:fahrenheit</span>
588
- <span class='id identifier rubyid_fahrenheit'>fahrenheit</span>
589
- <span class='kw'>when</span> <span class='symbol'>:kelvin</span>
590
- <span class='id identifier rubyid_kelvin'>kelvin</span>
591
- <span class='kw'>when</span> <span class='symbol'>:reaumur</span>
592
- <span class='id identifier rubyid_reaumur'>reaumur</span>
593
- <span class='kw'>else</span>
594
- <span class='id identifier rubyid_celsius'>celsius</span>
595
- <span class='kw'>end</span>
596
- <span class='kw'>end</span></pre>
597
- </td>
598
- </tr>
599
- </table>
600
- </div>
601
-
602
- <div class="method_details ">
603
- <h3 class="signature " id="to_s-instance_method">
604
-
605
- #<strong>to_s</strong> &#x21d2; <tt>Object</tt>
606
-
607
-
608
-
609
-
610
-
611
- </h3><table class="source_code">
612
- <tr>
613
- <td>
614
- <pre class="lines">
615
-
616
-
617
- 30
618
- 31
619
- 32</pre>
620
- </td>
621
- <td>
622
- <pre class="code"><span class="info file"># File 'lib/temperature_sensor.rb', line 30</span>
623
-
624
- <span class='kw'>def</span> <span class='id identifier rubyid_to_s'>to_s</span>
625
- <span class='id identifier rubyid_sprintf'>sprintf</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>%5.2f°C</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='ivar'>@temperature</span>
626
- <span class='kw'>end</span></pre>
627
- </td>
628
- </tr>
629
- </table>
630
- </div>
631
-
632
- </div>
633
-
634
- </div>
635
-
636
- <div id="footer">
637
- Generated on Wed Dec 26 18:10:15 2018 by
638
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
639
- 0.9.16 (ruby-2.3.3).
640
- </div>
641
-
642
- </div>
643
- </body>
644
- </html>