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
|
||||
end
|
||||
|
||||
def lights
|
||||
Huey::Bulb.all.each do |blb|
|
||||
puts status_line(blb)
|
||||
end
|
||||
true
|
||||
end
|
||||
|
||||
def refresh
|
||||
def lights
|
||||
Huey::Bulb.all.each do |blb|
|
||||
blb.reload
|
||||
puts status_line(blb)
|
||||
end
|
||||
true
|
||||
|
@ -73,6 +67,14 @@ def groups
|
|||
true
|
||||
end
|
||||
|
||||
def refresh!
|
||||
Huey::Bulb.all.each do |blb|
|
||||
blb.reload
|
||||
puts status_line(blb)
|
||||
end
|
||||
true
|
||||
end
|
||||
|
||||
def get(*names_or_ids)
|
||||
names_or_ids.map do |name_or_id|
|
||||
blb = Huey::Bulb.find(name_or_id)
|
||||
|
|
Reference in New Issue