Class: IoT::Receptor
- Inherits:
-
Object
show all
- Defined in:
- lib/iot/receptor.rb
Overview
Receptor - physical device that can provide info about real world
Instance Method Summary
collapse
Constructor Details
Returns a new instance of Receptor.
9
10
11
12
13
|
# File 'lib/iot/receptor.rb', line 9
def initialize
@model = 'N/A'
@name = 'N/A'
@value = nil
end
|
Instance Method Details
#model_name ⇒ Object
19
20
21
|
# File 'lib/iot/receptor.rb', line 19
def model_name
@model
end
|
#name ⇒ Object
15
16
17
|
# File 'lib/iot/receptor.rb', line 15
def name
@name
end
|
#read ⇒ Object
Also known as:
read_sensor
23
24
25
|
# File 'lib/iot/receptor.rb', line 23
def read
@value
end
|