Class: L8::Group
- Inherits:
-
Object
- Object
- L8::Group
- Defined in:
- lib/l8/group.rb
Instance Method Summary collapse
- #clear_matrix ⇒ Object
- #disable_status_leds ⇒ Object
- #identify ⇒ Object
-
#initialize(*ports) ⇒ Group
constructor
A new instance of Group.
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_matrix ⇒ Object
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_leds ⇒ Object
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 |
#identify ⇒ Object
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 |