Class: L8::Group

Inherits:
Object
  • Object
show all
Defined in:
lib/l8/group.rb

Direct Known Subclasses

Row, Stack

Instance Method Summary collapse

Constructor Details

#initialize(*ports) ⇒ Group

Returns a new instance of Group.



3
4
5
6
7
8
9
# File 'lib/l8/group.rb', line 3

def initialize(*ports)
  @l8s = []

  ports.each do |port|
    @l8s << L8::Smartlight.new(port)
  end
end

Instance Method Details

#clear_matrixObject



17
18
19
20
21
# File 'lib/l8/group.rb', line 17

def clear_matrix
  @l8s.each do |l8|
    l8.clear_matrix
  end
end

#disable_status_ledsObject



11
12
13
14
15
# File 'lib/l8/group.rb', line 11

def disable_status_leds
  @l8s.each do |l8|
    l8.disable_status_leds
  end
end

#identifyObject



23
24
25
26
27
# File 'lib/l8/group.rb', line 23

def identify
  @l8s.each_with_index do |l8, index|
    l8.display_character((index + 1).to_s)
  end
end