Method: Lights#initialize

Defined in:
lib/lights.rb

#initialize(ip, username = nil) ⇒ Lights

Returns a new instance of Lights.



16
17
18
19
20
21
22
23
24
25
# File 'lib/lights.rb', line 16

def initialize(ip,username=nil)
  @ip = ip 
  @username = username
  @http = Net::HTTP.new(ip,80)
  @bulbs = []
  @groups = []
  @bridges = []
  @logger = Logger.new(STDERR)
  @logger.level = LoggerConfig::LIGHTS_LEVEL
end