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
harbr-0.1.52 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.50 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.49 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.48 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.47 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.46 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.45 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.44 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.43 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.42 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.41 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.39 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.38 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
harbr-0.1.37 vendor/bundle/ruby/3.2.0/gems/terminal-table-3.0.2/examples/issue100.rb
terminal-table-3.0.2 examples/issue100.rb
terminal-table-3.0.1 examples/issue100.rb
terminal-table-3.0.0 examples/issue100.rb