Class: IoT::Receptor

Inherits:
Object
  • Object
show all
Defined in:
lib/iot/receptor.rb

Overview

Receptor - physical device that can provide info about real world

Direct Known Subclasses

BinaryReceptor, DigitalReceptor, Sensor

Instance Method Summary collapse

Constructor Details

#initializeReceptor

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_nameObject



19
20
21
# File 'lib/iot/receptor.rb', line 19

def model_name
  @model
end

#nameObject



15
16
17
# File 'lib/iot/receptor.rb', line 15

def name
  @name
end

#readObject Also known as: read_sensor



23
24
25
# File 'lib/iot/receptor.rb', line 23

def read
  @value
end