type_struct 0.7.4 → 0.8.0

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
- SHA1:
3
- metadata.gz: 3f4ff48a19c9ef6d1a18f5c197856c33e865cc67
4
- data.tar.gz: 86382480bbd65dc827b9e259e24451ca1dc1b7a9
2
+ SHA256:
3
+ metadata.gz: 8e9c0711f51f4b07350d1e6626ee95c5700bdcda3135ccc868aadd2f39339e03
4
+ data.tar.gz: 9d33ec7f4545520f3f8733124a785c8eb2eab9d935fc49835c66fc4ef2279507
5
5
  SHA512:
6
- metadata.gz: a22518962d818fed9ce7df5706cbebb0c00a0133889470a170b22558b8ae30ceeede2cbd0f6702d9c454fac997caed00aef68f21e1d2ca17d1b4dd6664ac93c8
7
- data.tar.gz: 71a68dd3f400725a002c9e4ea3397125548c3f309053f9055cb8528fdbbe5f45955bcdac616fe2312299ba6de0d46d4d1aa1362e6b662011770da4d3dcaecafc
6
+ metadata.gz: '0819f9514d820b7de819f7df65aeca74d7e4b4d1222fb9c0161559493840ec1251ab91ce3950736cb302db2dec989f228ec9f0fc6e68765e0dfb258c1350e1f9'
7
+ data.tar.gz: 63b659f3188a6ab433308439812b0a0122a2ace07ee7b81162260fc8ddfaea75534b28f59682e388b1dd3a44ab72fc49ec01ce7cb62c83782c6888171d433e97
@@ -1,8 +1,8 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.1.8
4
- - 2.2.4
5
- - 2.3.0
6
- before_install: gem install bundler -v 1.10.6
3
+ - 2.4.6
4
+ - 2.5.5
5
+ - 2.6.3
6
+ before_install: gem install bundler -v 2.0.2
7
7
  notifications:
8
8
  email: false
@@ -26,10 +26,10 @@ class TypeStruct
26
26
  errors << e
27
27
  end
28
28
  end
29
- instance_variable_set("@#{k}", sym_h[k])
30
29
  sym_h[k].freeze if self.class.frozen?
31
30
  end
32
31
  raise MultiTypeError, errors unless errors.empty?
32
+ @__store = sym_h
33
33
  end
34
34
 
35
35
  def ==(other)
@@ -180,14 +180,14 @@ class TypeStruct
180
180
 
181
181
  args.each_key do |k|
182
182
  define_method(k) do
183
- instance_variable_get("@#{k}")
183
+ @__store[k]
184
184
  end
185
185
 
186
186
  define_method("#{k}=") do |v|
187
187
  unless self.class.valid?(k, v)
188
188
  raise TypeError, "#{self.class}##{k} expect #{self.class.type(k)} got #{v.inspect}"
189
189
  end
190
- instance_variable_set("@#{k}", v)
190
+ @__store[k] = v
191
191
  end
192
192
  end
193
193
  end
@@ -1,3 +1,3 @@
1
1
  class TypeStruct
2
- VERSION = "0.7.4"
2
+ VERSION = "0.8.0"
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.4
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ksss
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-31 00:00:00.000000000 Z
11
+ date: 2019-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -96,8 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  - !ruby/object:Gem::Version
97
97
  version: '0'
98
98
  requirements: []
99
- rubyforge_project:
100
- rubygems_version: 2.6.8
99
+ rubygems_version: 3.0.6
101
100
  signing_key:
102
101
  specification_version: 4
103
102
  summary: Pseudo type system on struct.