Class: Milight::V6::Controller

Inherits:
Object
  • Object
show all
Defined in:
lib/milight/v6/controller.rb

Instance Method Summary collapse

Constructor Details

#initialize(host, port = 5987) ⇒ Controller

Returns a new instance of Controller.



10
11
12
# File 'lib/milight/v6/controller.rb', line 10

def initialize(host, port = 5987)
  @command = Milight::V6::Command.new(host, port)
end

Instance Method Details

#allObject

Select all zones.



15
16
17
# File 'lib/milight/v6/controller.rb', line 15

def all
  Milight::V6::All.new(@command)
end

#zone(zone_id) ⇒ Object

Select a specific zone.



20
21
22
# File 'lib/milight/v6/controller.rb', line 20

def zone(zone_id)
  Milight::V6::Zone.new(@command, zone_id)
end