table_transformer 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
  SHA1:
3
- metadata.gz: 7027cd7e92e9f5369a75818d564203eb120eb034
4
- data.tar.gz: 877b3b1d24540ca3f8f796ac119447c6b64a5bb1
3
+ metadata.gz: 3749b63b879abaf5369c7c9c20715358a01ad17a
4
+ data.tar.gz: 52bc19a464d192c4684cbe71f37aa00bda0df57a
5
5
  SHA512:
6
- metadata.gz: ea505c09786dd526c645953a9dab925c5aa568c5e88f92e50fc34e3c19258a2d21e09982454a8f1e2177f1fd3f9dd10b32a2b2517822f5dce10dfcf2d55dd635
7
- data.tar.gz: 15f090cbbe95adadd344d6fb33093aae6bc61568ba33965091005bf3df053439089630ba2b64ed6ed8e4e8479d655c138289220591bce9194b2eae3b38f0cc15
6
+ metadata.gz: c66fe0d82857433e9e868d145b2997252188bf3a67d11446853c0412a934498b72f3ba0201bccb8d1b3eca95254981589ecc63bd72b203474a9b3ca7aa16a5f1
7
+ data.tar.gz: 4c871948618d65ad741ca3443cc6526c9b70051f0467c5060d190937dfd6f7fa546108cdae32aadc6b2e973cce6b82bbb4d7cec192b53237629ea8892573e018
@@ -1,3 +1,3 @@
1
1
  module TableTransformer
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -49,7 +49,7 @@ module TableTransformer
49
49
  original.each do |data|
50
50
  transformed_data = {}.tap do |t_data|
51
51
  keys.each do |k|
52
- t_data[k] = data[k].to_s if data[k]
52
+ t_data[k] = data[k].to_s
53
53
  end
54
54
  break t_data
55
55
  end
@@ -77,7 +77,7 @@ module TableTransformer
77
77
  def max_size
78
78
  @max_size ||= {}.tap do |size|
79
79
  keys.each do |k|
80
- max_data = string_data.max_by { |data| data[k].size }
80
+ max_data = string_data.max_by { |data| data[k].to_s.size }
81
81
  size[k] = max_data[k].to_s.size
82
82
  end
83
83
  break size
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_transformer
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
  - Akito Ueno