Class: HDLRuby::High::Std::Board::LED
- Inherits:
-
Struct
- Object
- Struct
- HDLRuby::High::Std::Board::LED
- Defined in:
- lib/HDLRuby/ui/hruby_board.rb
Overview
Class describing a row of LEDs.
Instance Attribute Summary collapse
-
#hread ⇒ Object
Returns the value of attribute hread.
-
#id ⇒ Object
Returns the value of attribute id.
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
Instance Attribute Details
#hread ⇒ Object
Returns the value of attribute hread
95 96 97 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 95 def hread @hread end |
#id ⇒ Object
Returns the value of attribute id
95 96 97 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 95 def id @id end |
#size ⇒ Object
Returns the value of attribute size
95 96 97 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 95 def size @size end |
Instance Method Details
#to_html ⇒ Object
96 97 98 99 100 101 102 103 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 96 def to_html return "<div class=\"ledset\" id=\"#{self.id}\" data-value=\"0\">\\n" + '<span class="name">' + self.hread.to_s + '</span>' + '<span> </span>' + self.size.times.map do |i| '<i class="led" class="led_off"></i>\n' end.join + "</div>\\n" end |