Sha256: 3644dc705f376fe300faaf332c606b58418284dbab3c3f388b55cbaf2cf3714b
Contents?: true
Size: 440 Bytes
Versions: 6
Compression:
Stored size: 440 Bytes
Contents
# frozen_string_literal: true require 'tty-table' module Dri module Utils module Table def print_table(headers, rows, alignments: []) 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) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems