diff options
| author | Benjamin Sanders <ben@Benjamins-MacBook-Pro.local> | 2025-10-11 10:34:24 -0400 |
|---|---|---|
| committer | Benjamin Sanders <ben@Benjamins-MacBook-Pro.local> | 2025-10-11 10:34:24 -0400 |
| commit | 5571dc766e2143e39762ff0b47c41d1c2e154f4c (patch) | |
| tree | f4f124d314a7e76c04484515aa0fd1f2e271a601 /vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/examples/issue95.rb | |
| parent | 359f3309c97fc894b63e0a295c76ab298504d635 (diff) | |
Vendor bundled gems for deployment
Diffstat (limited to 'vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/examples/issue95.rb')
| -rwxr-xr-x | vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/examples/issue95.rb | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/examples/issue95.rb b/vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/examples/issue95.rb new file mode 100755 index 0000000..e6ddbf8 --- /dev/null +++ b/vendor/bundle/ruby/3.4.0/gems/terminal-table-3.0.2/examples/issue95.rb @@ -0,0 +1,42 @@ +#!/usr/bin/env ruby +require 'colorize' +require_relative '../lib/terminal-table.rb' + +original_sample_data = [ +["Sep 2016", 33, [-38, -53.52], 46, [-25, -35.21]], +["Oct 2016", 35, [2, 6.06], 50, [4, 8.69]] +] + +table = Terminal::Table.new headings: ["Month".cyan,"Monthly IT".cyan,"IT Difference OPM".cyan, +"Monthly OOT".cyan,"OOT Difference OPM".cyan], rows: original_sample_data + +table.style = { padding_left: 2, padding_right: 2, border_x: "-".blue, border_y: "|".blue, border_i: "+".blue } + +puts table + +puts "" +puts "^ good table" +puts "v wonky table" +puts "" + +split_column_sample_data = [ +["Sep 2016", 33, -38, -53.52, 46, -25, -35.21], +["Oct 2016", 35, 2, 6.06, 50, 4, 8.69] +] + +table = Terminal::Table.new headings: ["Month".cyan,"Monthly IT".cyan, +{value: "IT Difference OPM".cyan, colspan: 2}, "Monthly OOT".cyan, +{value: "OOT Difference OPM".cyan, colspan: 2}], rows: split_column_sample_data + +table.style = { padding_left: 2, padding_right: 2, border_x: "-".blue, border_y: "|".blue, border_i: "+".blue } + +puts table + + +table = Terminal::Table.new headings: ["Month","Monthly IT", +{value: "IT Difference OPM", colspan: 2}, "Monthly OOT", +{value: "OOT Difference OPM", colspan: 2}], rows: split_column_sample_data + +table.style = { padding_left: 2, padding_right: 2, border_x: "-".blue, border_y: "|".cyan, border_i: "+" } + +puts table |
