Module: CheekyPi::Factory

Defined in:
lib/cheeky-pi/factory.rb

Class Method Summary collapse

Class Method Details

.find_lightsObject



5
6
7
8
# File 'lib/cheeky-pi/factory.rb', line 5

def self.find_lights
  reds = Dir.glob('/sys/devices/**/red')
  reds.collect {|red| Light.new(File.dirname(red)) }
end