type_struct 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cbecb2844975883551a46f903fbf34f9439e41b2
4
- data.tar.gz: f58dee879f4b19b1d6af9881f69cca31d156f1c2
3
+ metadata.gz: 4c4980fad4adaa9e864b7e7d61b4561687b945a6
4
+ data.tar.gz: 69fc7fbad59d06eba7033574877a5cd3f29d162a
5
5
  SHA512:
6
- metadata.gz: b7d605b64ed3a8c7a0c988acbddcb9236f51fd2e58b25f3ca040a1d7e9e2cd28cd3f013cf406e8dec0531bc7c329cb116494f2c2d9c3a32fe01c843e86156196
7
- data.tar.gz: bbec831d29e3edcbbcd764e1dc462335f899d94c106ca45b6b6bf8f39c9cc66aadd70fc91bb3df89e838620310e35293d62d277dc7d0a20eafed9f6550a6f3fc
6
+ metadata.gz: cb6f91c7ab75daa59bbe963ed1402a7ca40967923cbddf9ff3d28be8cb21f4c5f5f59c80ea6be0bf911c4cfc014002ff05922bcd42c55dae807a9853363e0657
7
+ data.tar.gz: 60c49aee26de2c1269ce60d92ba15d7ec53ff13d22b843d340ef468e4346de2bdc555d33e34a1cb8dd4457ea08285b2206d133d9b8e3355db6bda54e57334b70
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class TypeStruct
2
4
  # Respects:
3
5
  # http://json2struct.mervine.net/
@@ -41,10 +43,12 @@ class TypeStruct
41
43
  if value.empty?
42
44
  "Hash"
43
45
  else
44
- type_struct = key.to_s.gsub(/e?s\z/, '').split('_').map(&:capitalize).join
46
+ type_struct = key.to_s.gsub(/s\z/, '').split('_').map(&:capitalize).join
45
47
  parse(type_struct, value)
46
48
  type_struct
47
49
  end
50
+ when Fixnum, Bignum
51
+ "Integer"
48
52
  when NilClass
49
53
  "Object"
50
54
  when TrueClass, FalseClass
@@ -1,3 +1,3 @@
1
1
  class TypeStruct
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: type_struct
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-09 00:00:00.000000000 Z
11
+ date: 2016-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
97
97
  version: '0'
98
98
  requirements: []
99
99
  rubyforge_project:
100
- rubygems_version: 2.6.4
100
+ rubygems_version: 2.4.5.1
101
101
  signing_key:
102
102
  specification_version: 4
103
103
  summary: Pseudo type system on struct.