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

Version Path
terminal-table-4.0.0 examples/issue100.rb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-2.8.1 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.10 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.9 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.8 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.7 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.6 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.5 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.4 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.3 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.2 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.1 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.2.0 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.99 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.98 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.97 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.96 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.95 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.94 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb