class HueCommand

The 'hue' commmands

Public Instance Methods

list() click to toggle source
# File lib/ha/hue_command.rb, line 7
def list
  hue = Hue.new(context, Hue.bridge_state)
  table = CliTable.new
  table.headers = list_headers
  table.rows =  hue.all_a list_headers
  table.column_widths = column_widths
  puts table.render
end
pair() click to toggle source
# File lib/ha/hue_command.rb, line 17
def pair
  Hue.new(context).pair
end

Private Instance Methods

column_widths() click to toggle source
# File lib/ha/hue_command.rb, line 31
def column_widths
  ["5", "22", "12", "-30"]
end
context() click to toggle source
# File lib/ha/hue_command.rb, line 23
def context
  Context.new
end
list_headers() click to toggle source
# File lib/ha/hue_command.rb, line 27
def list_headers
  ["id", "name", "on", "detail"]
end