texttable 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/texttable.rb +2 -2
- data/texttable.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcc235765c111324bc8acf802e9db55ce82b787ba696d6777151c7c92754e0d2
|
4
|
+
data.tar.gz: 7319fc51ee82db342addb5f6fa0086ae4498031a3cdf6ed9fb3a9b50776dfd6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
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-
|
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
|