pour 0.0.3.0 → 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
- data/lib/pour/gem.rb +1 -1
- data/lib/pour/propertied.rb +10 -12
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebe6d283087ba11879c0cf2b7ed65758ab1fb0ac
|
4
|
+
data.tar.gz: a3ce81dd54227b0b44d8e2bb149fd755f92784a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce54526f2aaea1c62839fa9bce40f03c779df3181896814d9e0e5e6690deaef570b9519290df0d8802b35a6b66379a7f38348644d284e566147461f1762e7657
|
7
|
+
data.tar.gz: dcf1849dd8da8ff094c8fa9f190d83e70ab01328a0c59da2b1b7735435a8ccfcb59a0d0fdd116e1b9c3bdb337d1a9317bbb07254c96f06520071ec02982003f9
|
data/lib/pour/gem.rb
CHANGED
data/lib/pour/propertied.rb
CHANGED
@@ -13,19 +13,17 @@ module Pour
|
|
13
13
|
reader = name.to_sym
|
14
14
|
writer = "#{name}=".to_sym
|
15
15
|
|
16
|
-
self.
|
17
|
-
|
18
|
-
|
19
|
-
end
|
16
|
+
self.send :define_method, reader do
|
17
|
+
self.instance_variable_get(decorated)
|
18
|
+
end
|
20
19
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
end
|
20
|
+
self.send :define_method, writer do |new_value|
|
21
|
+
if property.typespec.valid?(new_value)
|
22
|
+
self.instance_variable_set(decorated, new_value)
|
23
|
+
else
|
24
|
+
# TODO(mtwilliams): Recursively map to determine where and why the
|
25
|
+
# |new_value| doesn't match the typespec.
|
26
|
+
raise "#{new_value.inspect} doesn't match typespec: #{typespec.inspect}"
|
29
27
|
end
|
30
28
|
end
|
31
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pour
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.3.
|
4
|
+
version: 0.0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typespec
|