Sha256: 3c13e05a67924c8157b4eeaa723fe4c5c9d40b20525f70fc49346604b9f3e9ec
Contents?: true
Size: 579 Bytes
Versions: 7
Compression:
Stored size: 579 Bytes
Contents
require 'whipped-cream/control' module WhippedCream # A Sensor displays the state of something, such as a pin's value, or the # return value of the method. Sensors can also have callbacks associated with # state changes. class Sensor < Control attr_reader :name, :pin, :low, :high, :on_low, :on_high, :block def initialize(name, options = {}, &block) @name = name @pin = options[:pin] @low = options[:low] @high = options[:high] @on_low = options[:on_low] @on_high = options[:on_high] @block = block end end end
Version data entries
7 entries across 7 versions & 1 rubygems