Class: BundlerDate::UI::TerminalTable
- Inherits:
-
Object
- Object
- BundlerDate::UI::TerminalTable
- Defined in:
- lib/bundler_date/ui/terminal_table.rb
Instance Method Summary collapse
-
#initialize(headings, ui_rows) ⇒ TerminalTable
constructor
A new instance of TerminalTable.
- #to_str ⇒ Object
Constructor Details
#initialize(headings, ui_rows) ⇒ TerminalTable
Returns a new instance of TerminalTable.
6 7 8 9 10 |
# File 'lib/bundler_date/ui/terminal_table.rb', line 6 def initialize(headings, ui_rows) @table = ::Terminal::Table.new(headings: headings, rows: ui_rows.map(&:to_ary)).tap do |t| t.style = { border_x: "", border_y: "", border_i: "" } end end |
Instance Method Details
#to_str ⇒ Object
12 13 14 |
# File 'lib/bundler_date/ui/terminal_table.rb', line 12 def to_str @table.render end |