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
54 55 56 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 54 def hread @hread end |
#id ⇒ Object
Returns the value of attribute id
54 55 56 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 54 def id @id end |
#size ⇒ Object
Returns the value of attribute size
54 55 56 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 54 def size @size end |
Instance Method Details
#to_html ⇒ Object
55 56 57 58 59 60 61 62 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 55 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 |