Files
news.gitea.happylizard.me/bin/gems/terminal-table-3.0.2/examples/issue100.rb
T
pizza2d1 4cee170d66
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 9s
Add bin and edit workflow
2026-09-16 13:11:16 -06:00

35 lines
710 B
Ruby
Executable File

#!/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