class ET::Formatter

Constants

BLACK
BLUE
BOLD
CLEAR
CYAN
GREEN
MAGENTA
RED
WHITE
YELLOW

Public Class Methods

print_table(data, *headers) click to toggle source

Private Class Methods

build_row(row, widths, color) click to toggle source
# File lib/et/formatter.rb, line 26
def self.build_row(row, widths, color)
  row.zip(widths).map do |value, width|
    " \e[#{color}m%-#{width}s\e[0m " % value
  end.join("\e[34m|\e[0m")
end