Sha256: c01080cd982fd7e7c95a6c4e944b24a5f7dfcd80b6143db0a91389ddae92c1b5
Contents?: true
Size: 710 Bytes
Versions: 77
Compression:
Stored size: 710 Bytes
Contents
#!/usr/bin/env ruby # Methods to suppress left/right borders using border_left & border_right require_relative "../lib/terminal-table" table = Terminal::Table.new do |t| t.headings = ['id', 'name'] t.rows = [[1, 'One'], [2, 'Two'], [3, 'Three']] t.style = { :border_left => false, :border_top => false, :border_bottom => false } end puts table puts # no right table.style = {:border_right => false } puts table puts # no right table.style = {:border_left => true } puts table puts table.style.border = Terminal::Table::UnicodeBorder.new puts table table.style = {:border_right => false, :border_left => true } puts table table.style = {:border_right => true, :border_left => false } puts table
Version data entries
77 entries across 77 versions & 3 rubygems