Class: Honcho::UI::Table
- Inherits:
-
Object
- Object
- Honcho::UI::Table
- Defined in:
- lib/honcho/ui_runner/table.rb
Instance Attribute Summary collapse
-
#columns ⇒ Object
readonly
Returns the value of attribute columns.
-
#headings ⇒ Object
Returns the value of attribute headings.
-
#left ⇒ Object
Returns the value of attribute left.
-
#top ⇒ Object
Returns the value of attribute top.
-
#width ⇒ Object
Returns the value of attribute width.
Instance Method Summary collapse
- #draw(data) ⇒ Object
-
#initialize(headings:, width:, top:, left:) ⇒ Table
constructor
A new instance of Table.
Constructor Details
#initialize(headings:, width:, top:, left:) ⇒ Table
Returns a new instance of Table.
6 7 8 9 10 11 |
# File 'lib/honcho/ui_runner/table.rb', line 6 def initialize(headings:, width:, top:, left:) @headings = headings @width = width @top = top @left = left end |
Instance Attribute Details
#columns ⇒ Object (readonly)
Returns the value of attribute columns.
14 15 16 |
# File 'lib/honcho/ui_runner/table.rb', line 14 def columns @columns end |
#headings ⇒ Object
Returns the value of attribute headings.
13 14 15 |
# File 'lib/honcho/ui_runner/table.rb', line 13 def headings @headings end |
#left ⇒ Object
Returns the value of attribute left.
13 14 15 |
# File 'lib/honcho/ui_runner/table.rb', line 13 def left @left end |
#top ⇒ Object
Returns the value of attribute top.
13 14 15 |
# File 'lib/honcho/ui_runner/table.rb', line 13 def top @top end |
#width ⇒ Object
Returns the value of attribute width.
13 14 15 |
# File 'lib/honcho/ui_runner/table.rb', line 13 def width @width end |
Instance Method Details
#draw(data) ⇒ Object
16 17 18 19 20 |
# File 'lib/honcho/ui_runner/table.rb', line 16 def draw(data) draw_headings draw_data(data) Curses.refresh end |