Class: Denko::Sensor::Humidity

Inherits:
Object
  • Object
show all
Includes:
Behaviors::Poller
Defined in:
lib/denko/sensor/virtual.rb

Instance Attribute Summary

Attributes included from Behaviors::Threaded

#interrupts_enabled, #thread

Attributes included from Behaviors::Callbacks

#callback_mutex

Instance Method Summary collapse

Methods included from Behaviors::Poller

#poll, #poll_using, #stop

Methods included from Behaviors::Threaded

#enable_interrupts, included, #stop, #stop_thread, #threaded, #threaded_loop

Methods included from Behaviors::Reader

#read, #read_using, #wait_for_read

Methods included from Behaviors::Callbacks

#add_callback, #callbacks, #pre_callback_filter, #remove_callback, #update

Methods included from Behaviors::State

#state

Constructor Details

#initialize(sensor) ⇒ Humidity

Returns a new instance of Humidity.



30
31
32
33
# File 'lib/denko/sensor/virtual.rb', line 30

def initialize(sensor)
  @sensor = sensor
  super
end

Instance Method Details

#_readObject



35
36
37
# File 'lib/denko/sensor/virtual.rb', line 35

def _read
  @sensor.read_humidity
end