Class: SensorState

Inherits:
Object
  • Object
show all
Defined in:
lib/lights/sensor.rb

Direct Known Subclasses

TapState

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ SensorState

Returns a new instance of SensorState.



3
4
5
6
# File 'lib/lights/sensor.rb', line 3

def initialize(data)
  @data = data
  @last_updated = data["lastupdated"]
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



2
3
4
# File 'lib/lights/sensor.rb', line 2

def data
  @data
end

#last_updatedObject (readonly)

Returns the value of attribute last_updated.



2
3
4
# File 'lib/lights/sensor.rb', line 2

def last_updated
  @last_updated
end