texttable 1.1.9 → 1.1.10
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 +6 -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: c8055fd1e6304a359eb5fd7a2cad2edd6a6f908e56d530d905b303a7d67bd767
|
4
|
+
data.tar.gz: 47c438e04d322e05388e605123f7bcd477318634430d5ab5d8537f14997936a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f17047f82b879f67f4a0d89ccbd3ac18a92327ff2c8ae967625d382a0ee712e29fea7c2d8fc83b869e3eebe4f8a5159084383d224cf075000c6f9af081464fa
|
7
|
+
data.tar.gz: bdfa482758d242886d149e93587c86109d0556dbca721a1db82e0cbaea82132a158df3db02e0c1a8a0e189c73f11b36b291fc8fe7d2ba51835407c556a6fcd1c
|
data/lib/texttable.rb
CHANGED
@@ -147,9 +147,8 @@ class TextTable
|
|
147
147
|
value
|
148
148
|
end
|
149
149
|
|
150
|
-
def
|
150
|
+
def update(obj, *args)
|
151
151
|
obj = [obj, *args] if args.size > 0
|
152
|
-
@values = @rows[@row = @rows.size] = []
|
153
152
|
case obj
|
154
153
|
when Hash then obj.each {|k, v| @values[index(k.to_s, true)] = v }
|
155
154
|
when Array then @values.replace(obj)
|
@@ -158,6 +157,11 @@ class TextTable
|
|
158
157
|
self
|
159
158
|
end
|
160
159
|
|
160
|
+
def add(obj, *args)
|
161
|
+
@values = @rows[@row = @rows.size] = []
|
162
|
+
update(obj, *args)
|
163
|
+
end
|
164
|
+
|
161
165
|
alias :<< :add
|
162
166
|
|
163
167
|
def show(*)
|
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.1.
|
4
|
+
version: 1.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Steve Shreeve
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-27 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
|