table_format 0.0.1 → 0.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6305bf0c58e332244e99cf17d886b464e2a171d5b3725c27fd99a6245bb6f240
4
- data.tar.gz: 3b17401ae6d8e231c29504e59f86ce22f869533489e13cf9b8a93689bea21661
3
+ metadata.gz: 4a86c63ac0f5f0dc4e3b9a03deb6be638b38a27775452cc7471bbc60fb68ca72
4
+ data.tar.gz: 3560e586267ddd3d5f6718ba623008b5bcebc5430f9f5b165d03d6553481bcd2
5
5
  SHA512:
6
- metadata.gz: 4de5cfd39d6f9afe11e02ecb9957489b4c2720804656abb065dad688e2c8b7ee39e2fe1a70bbd1ea61dda0886841161703f6c1f84ff37017bd34da3a6e39e35b
7
- data.tar.gz: 17cd1665ed3203b7d01e7ca4a8ca1c2179ce0bd685276b99d9f9f90652f5aa879baf05442f75efd334c2a8b836a8959cd5e20b065e4099af7b69358a60936046
6
+ metadata.gz: 7ffbc2bb7690dbaf1e785fee2801cd6326da3add0b14133b03cabc77f221943e223cd240457ed2c3993673671068e4c903be28191a0e2b28173147d669672976
7
+ data.tar.gz: 4772e4975a09975ea1a953ea7302e119ce2da3539cd19e38b88c6cb39819cc11a11c632fff820fad0409bf90649ce0ec02ea92c4c02ffdfcb8a80f3b73f3c1a6
data/README.org CHANGED
@@ -8,7 +8,6 @@
8
8
 
9
9
  #+BEGIN_SRC ruby
10
10
  tp Object.constants.grep(/RUBY_/).map { |e| [e, Object.const_get(e)] }.to_h
11
-
12
11
  # >> |---------------------+------------------------------------------------------------|
13
12
  # >> | RUBY_VERSION | 2.5.0 |
14
13
  # >> | RUBY_RELEASE_DATE | 2017-12-25 |
@@ -13,9 +13,6 @@ puts [{'a': {'a': 1}}].to_t
13
13
  # >> |----|
14
14
  # >> | ok |
15
15
  # >> |----|
16
- # >> |----|
17
- # >> | ok |
18
- # >> |----|
19
16
  # >> |-----|
20
17
  # >> | foo |
21
18
  # >> |-----|
@@ -31,10 +31,12 @@ puts
31
31
  # set global options
32
32
  TableFormat.default_options.update(markdown: true)
33
33
  tp array
34
+ # >> |----+-------|
34
35
  # >> | id | name |
35
- # >> |----|-------|
36
+ # >> |----+-------|
36
37
  # >> | 1 | alice |
37
38
  # >> | 2 | bob |
39
+ # >> |----+-------|
38
40
  # >>
39
41
  # >> | id | name |
40
42
  # >> |----|-------|
@@ -23,11 +23,6 @@ module TableFormat
23
23
  end
24
24
 
25
25
  class Generator
26
- def self.default_options
27
- warn "[DEPRECATED] `TableFormat::Generator.default_options' is deprecated. Use `TableFormat.default_options' instead."
28
- TableFormat.default_options
29
- end
30
-
31
26
  def initialize(rows, **options)
32
27
  @options = TableFormat.default_options.merge(options)
33
28
 
@@ -1,3 +1,3 @@
1
1
  module TableFormat
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -93,6 +93,15 @@ EOT
93
93
  EOT
94
94
  end
95
95
 
96
+ it 'Struct' do
97
+ Struct.new(:a, :b).new(1, 2).to_h.to_t.should == <<~EOT
98
+ |---+---|
99
+ | a | 1 |
100
+ | b | 2 |
101
+ |---+---|
102
+ EOT
103
+ end
104
+
96
105
  it 'Others' do
97
106
  1.to_t.should be_present
98
107
  '1'.to_t.should be_present
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_format
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - akicho8