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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f752e5c5701d52dabb1d1b96f9237bc44afac7d0
4
- data.tar.gz: 960ffe276844fed404fe548686bae1fcfd084816
3
+ metadata.gz: ebe6d283087ba11879c0cf2b7ed65758ab1fb0ac
4
+ data.tar.gz: a3ce81dd54227b0b44d8e2bb149fd755f92784a5
5
5
  SHA512:
6
- metadata.gz: ff063ee9dd1919d3b62c084e5dca97fcd6fe607679386ef91d91fa599fbff291599a5dfd54b21103e178cee5c54e0832a03204a5ddad153978e66e15f3803a0b
7
- data.tar.gz: 668640df8cb10d3e65a646cd3b959b31e282c2eb48e622e2bb097b0773d8c5668b97499fa5eddce1a59bec86aa1820078ea4694c846ac6b1462a43791622e21a
6
+ metadata.gz: ce54526f2aaea1c62839fa9bce40f03c779df3181896814d9e0e5e6690deaef570b9519290df0d8802b35a6b66379a7f38348644d284e566147461f1762e7657
7
+ data.tar.gz: dcf1849dd8da8ff094c8fa9f190d83e70ab01328a0c59da2b1b7735435a8ccfcb59a0d0fdd116e1b9c3bdb337d1a9317bbb07254c96f06520071ec02982003f9
@@ -41,7 +41,7 @@ module Pour
41
41
  end
42
42
 
43
43
  module VERSION #:nodoc:
44
- MAJOR, MINOR, PATCH, PRE = [0, 0, 3, 0]
44
+ MAJOR, MINOR, PATCH, PRE = [0, 0, 3, 1]
45
45
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
46
46
  end
47
47
 
@@ -13,19 +13,17 @@ module Pour
13
13
  reader = name.to_sym
14
14
  writer = "#{name}=".to_sym
15
15
 
16
- self.class_eval do
17
- define_method reader do
18
- self.insance_variable_get(decorated)
19
- end
16
+ self.send :define_method, reader do
17
+ self.instance_variable_get(decorated)
18
+ end
20
19
 
21
- define_method writer do |new_value|
22
- if property.typespec.valid?(new_value)
23
- self.insance_variable_set(decorated, new_value)
24
- else
25
- # TODO(mtwilliams): recursively map to determine where and why the
26
- # |new_value| doesn't match the typespec.
27
- raise ":("
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.0
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-01-02 00:00:00.000000000 Z
11
+ date: 2016-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typespec