Rename 'refresh' to 'refresh!'; reorder commands
This commit is contained in:
parent
0e2b7f5d36
commit
ddac8fc45e
16
huec
16
huec
|
@ -51,16 +51,10 @@ def status_line(blb)
|
||||||
return line
|
return line
|
||||||
end
|
end
|
||||||
|
|
||||||
def lights
|
|
||||||
Huey::Bulb.all.each do |blb|
|
|
||||||
puts status_line(blb)
|
|
||||||
end
|
|
||||||
true
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def refresh
|
def lights
|
||||||
Huey::Bulb.all.each do |blb|
|
Huey::Bulb.all.each do |blb|
|
||||||
blb.reload
|
|
||||||
puts status_line(blb)
|
puts status_line(blb)
|
||||||
end
|
end
|
||||||
true
|
true
|
||||||
|
@ -73,6 +67,14 @@ def groups
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def refresh!
|
||||||
|
Huey::Bulb.all.each do |blb|
|
||||||
|
blb.reload
|
||||||
|
puts status_line(blb)
|
||||||
|
end
|
||||||
|
true
|
||||||
|
end
|
||||||
|
|
||||||
def get(*names_or_ids)
|
def get(*names_or_ids)
|
||||||
names_or_ids.map do |name_or_id|
|
names_or_ids.map do |name_or_id|
|
||||||
blb = Huey::Bulb.find(name_or_id)
|
blb = Huey::Bulb.find(name_or_id)
|
||||||
|
|
Reference in New Issue