class OpenPull::Table

Constants

HEADINGS

Public Class Methods

rewind!() click to toggle source
# File lib/openpull/table.rb, line 10
def rewind!
  print "\r"
end
show(sub_tables) click to toggle source
# File lib/openpull/table.rb, line 14
def show(sub_tables)
  rewind!

  Terminal::Table.new(headings: HEADINGS.map(&:bold)) do |tab|
    sub_tables.each_with_index do |sub_table, j|
      sub_table.each_with_index do |row, i|
        tab.add_separator if i.zero? && !j.zero?
        tab.add_row row
      end
    end
  end
end