Rename options to config
This commit is contained in:
parent
5eb6ddb307
commit
d89d2e2c22
|
@ -6,7 +6,7 @@ module Hued
|
||||||
class Engine
|
class Engine
|
||||||
|
|
||||||
def initialize(options = {})
|
def initialize(options = {})
|
||||||
@options = Hued.config
|
@config = Hued.config
|
||||||
@log = Hued.log
|
@log = Hued.log
|
||||||
@ctime = Hash.new(Time.now)
|
@ctime = Hash.new(Time.now)
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ module Hued
|
||||||
Huey.configure do |cfg|
|
Huey.configure do |cfg|
|
||||||
cfg.hue_ip = bridge_cfg["ip"]
|
cfg.hue_ip = bridge_cfg["ip"]
|
||||||
cfg.uuid = bridge_cfg["user"]
|
cfg.uuid = bridge_cfg["user"]
|
||||||
if @options[:hue_debug]
|
if @config[:hue_debug]
|
||||||
cfg.logger = @log
|
cfg.logger = @log
|
||||||
else
|
else
|
||||||
# Use the default logger and make it shut up
|
# Use the default logger and make it shut up
|
||||||
|
@ -37,7 +37,7 @@ module Hued
|
||||||
@lights = Huey::Bulb.all
|
@lights = Huey::Bulb.all
|
||||||
@lights.each do |light|
|
@lights.each do |light|
|
||||||
@log.info "* Found light #{light.id}: #{light.name}"
|
@log.info "* Found light #{light.id}: #{light.name}"
|
||||||
light.alert! if @options[:blink]
|
light.alert! if @config[:blink]
|
||||||
end
|
end
|
||||||
@log.info "Found #{@lights.count} light#{"s" unless @lights.count == 1}"
|
@log.info "Found #{@lights.count} light#{"s" unless @lights.count == 1}"
|
||||||
|
|
||||||
|
|
Reference in New Issue