texttable 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/texttable.rb +2 -2
  3. data/texttable.gemspec +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 640e41c172547a26f5220517e36c7c9c1f0539cf5b53cfa7ec6b859955050660
4
- data.tar.gz: 2ae7cf4e4327315d2b1192912e54fe9c7d605005d7d3c1f063e32e30ce59c4ef
3
+ metadata.gz: dcc235765c111324bc8acf802e9db55ce82b787ba696d6777151c7c92754e0d2
4
+ data.tar.gz: 7319fc51ee82db342addb5f6fa0086ae4498031a3cdf6ed9fb3a9b50776dfd6a
5
5
  SHA512:
6
- metadata.gz: 72c809d91d915f1afa89a3b6a68829ae74b2fab7a15564d70b4640cbd930268eaf2e9847320507dca9b6af1afee5318472130f7a2983ba4dd46f3d67370dc36b
7
- data.tar.gz: c0ed2baecfd3e58c026444dc9ee7c9838b961ab2e8bb34500f6eb18676253653633d45e39a2689d24d05562562b607282fdc3563f5521c1d74327c68558b6be0
6
+ metadata.gz: 83b0233c215082196e62d06c0332c7e730090d09e6aad274a184fa6f108af4cead8b5afaddf5196f7f082cc4265dfdbdd50c4985a8702bc0a6fa198743730daf
7
+ data.tar.gz: 61edc55c5e93bf8797495e57d3946d5b28bc4de915558da778373e903eafd7021bc1f4514e07c15a0a07f041698d3ec10be4375d01998d0bc7bfe53e7937fd9b
data/lib/texttable.rb CHANGED
@@ -90,12 +90,12 @@ class TextTable
90
90
 
91
91
  def show
92
92
  join = " | "
93
- both = [cols.keys] + rows
93
+ both = [@cols.keys] + rows
94
94
  flip = both.transpose
95
95
  wide = flip.map {|row| row.map {|col| col.to_s.size }.max }
96
96
  pict = wide.map {|len| "%-#{len}.#{len}s" }.join(join)
97
97
  pict = [join, pict, join].join.strip
98
- line = (pict % ([""] * cols.size)).tr("| ", "+-")
98
+ line = (pict % ([""] * @cols.size)).tr("| ", "+-")
99
99
  seen = -1
100
100
  puts "", line
101
101
  both.each do |vals|
data/texttable.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "texttable"
5
- s.version = "1.0.1"
5
+ s.version = "1.0.2"
6
6
  s.author = "Steve Shreeve"
7
7
  s.email = "steve.shreeve@gmail.com"
8
8
  s.summary = "An easy way to print rows and columns as simple tables"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: texttable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steve Shreeve
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-10-28 00:00:00.000000000 Z
11
+ date: 2019-11-02 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: This gem will auto-size based on column widths.
14
14
  email: steve.shreeve@gmail.com