Class: BundlerDate::UI::TerminalTable

Inherits:
Object
  • Object
show all
Defined in:
lib/bundler_date/ui/terminal_table.rb

Instance Method Summary collapse

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_strObject



12
13
14
# File 'lib/bundler_date/ui/terminal_table.rb', line 12

def to_str
  @table.render
end