Sha256: ef5ef10a543813843c12ba5a78385edcf0481851e82e468114d2072229102104
Contents?: true
Size: 460 Bytes
Versions: 9
Compression:
Stored size: 460 Bytes
Contents
# frozen_string_literal: true require 'tty-table' module Dri module Utils module Table def print_table(headers, rows, alignments: [], **kwargs) if alignments.empty? (1..headers.size).each do alignments.push(:center) end end table = TTY::Table.new(headers, rows) puts table.render(:ascii, resize: true, multiline: true, alignments: alignments, **kwargs) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems