table-formatter 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/table-formatter.rb +5 -3
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c879cf9f1dbc62005f469f7bb47ba97db0a5b1aa
|
4
|
+
data.tar.gz: 6bd2c0898902a152862529836da885c07e20c62f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88615ee2dbe61020008b9bb1e8c6229ca5542636a8f501eb214447c54b8789189bb5e67384e168f5ee8363246bd0830c53ec421abab7b205922f14268cd0657e
|
7
|
+
data.tar.gz: 7c744c2bf61b9d41e5110506b4b90c3e45380af3b898c8b098d101ad1ddb72c41f2b8a2aabdab775b9b569f83fdf32d29820692af1a4a14fd27bfcc91d0cc9c7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/table-formatter.rb
CHANGED
@@ -4,9 +4,10 @@
|
|
4
4
|
|
5
5
|
class TableFormatter
|
6
6
|
|
7
|
-
attr_accessor :source, :labels, :border, :divider
|
7
|
+
attr_accessor :source, :labels, :border, :divider, :markdown
|
8
8
|
|
9
|
-
def initialize(source: nil, labels: nil, border: true, wrap: true,
|
9
|
+
def initialize(source: nil, labels: nil, border: true, wrap: true,
|
10
|
+
divider: nil, markdown: false)
|
10
11
|
|
11
12
|
super()
|
12
13
|
@source = source
|
@@ -15,10 +16,11 @@ class TableFormatter
|
|
15
16
|
@wrap = wrap
|
16
17
|
@divider = divider
|
17
18
|
@maxwidth = 60
|
19
|
+
@markdown = markdown
|
18
20
|
|
19
21
|
end
|
20
22
|
|
21
|
-
def display(width=nil, widths: nil, markdown:
|
23
|
+
def display(width=nil, widths: nil, markdown: @markdown)
|
22
24
|
|
23
25
|
return display_markdown(@source, @labels) if markdown
|
24
26
|
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|