texttable 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/texttable.rb +8 -0
  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: 3c035cbbcd41305294dd4118ac345509de89a5705d40c4051cc3e788ea208a5e
4
- data.tar.gz: 6af6f4624fc36ff624a9f98d19919e177bef5686b87c139d360a7f84c6514451
3
+ metadata.gz: 3371472c803832aced833a92b14b5f126bc6610b567a3afd3f845a4c40e5d480
4
+ data.tar.gz: 97265de8fbaaab1b17e53a48174abea14230f13ea4e3cf87536d7ac492555e57
5
5
  SHA512:
6
- metadata.gz: 9ed008e7c217c7c7ae9b90b5f2ff1716816a25240c35279a5aea92e92b96414eb75274ffb28efa8afd9815f57fa487d0d6c57484f1d03f4c366801c44ba9e515
7
- data.tar.gz: 4a618de33a78ab41386f5ac8ec7f4f68781c8601b83ef694d9f55644a6e2089bfce821f67570036354b101f0d1b3448f6341380d28bb032e52ab3824da1c7a03
6
+ metadata.gz: b01e8f14a894c5267a9d348a88c847be6a769aec8741e9b07eae2e3377151c6d3b41ee06798aaf8b3d6ab9734ad9e81ffb211c98ebc513ff7d7d766a832c5f0f
7
+ data.tar.gz: 951fce44d2dabb5f6fa6beec146d5fae31da4e2896c3ed3a3c001333bcf84e2ed497452672f67d3899e168dc432c0f2b992fa57669a550be96e9357cc64e21a8
data/lib/texttable.rb CHANGED
@@ -59,6 +59,14 @@ class TextTable
59
59
  @row
60
60
  end
61
61
 
62
+ def next!(step=1)
63
+ row(@row += step) if @row < (size - step)
64
+ end
65
+
66
+ def prev!(step=1)
67
+ row(@row -= step) if @row > 0
68
+ end
69
+
62
70
  def vals
63
71
  @values ||= @rows[@row] ||= []
64
72
  end
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.4"
5
+ s.version = "1.0.5"
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.4
4
+ version: 1.0.5
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-16 00:00:00.000000000 Z
11
+ date: 2019-12-06 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