Class: HDLRuby::High::Std::Board::DIGIT
- Inherits:
-
Struct
- Object
- Struct
- HDLRuby::High::Std::Board::DIGIT
- Defined in:
- lib/HDLRuby/ui/hruby_board.rb
Overview
Class describing a digit display.
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
66 67 68 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 66 def hread @hread end |
#id ⇒ Object
Returns the value of attribute id
66 67 68 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 66 def id @id end |
#size ⇒ Object
Returns the value of attribute size
66 67 68 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 66 def size @size end |
Instance Method Details
#to_html ⇒ Object
67 68 69 70 71 72 73 74 |
# File 'lib/HDLRuby/ui/hruby_board.rb', line 67 def to_html return '<div class="digitset" id=' + self.id.to_s + ' data-width="' + self.size.to_s + '" data-value="0" >' + '<span class="name">' + self.hread.to_s + '</span>' + '<span> </span>' + '<span class="matrix">' + " "*self.size + '</span>' + "</div>\\n" end |