structure 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/structure.rb +6 -0
- data/lib/structure/class_methods.rb +3 -6
- data/lib/structure/double.rb +1 -1
- data/lib/structure/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6b0dd37534ddbab651d055ac20449409d4d2a26f943b5ece647eafe56d0be1a
|
4
|
+
data.tar.gz: 9b41302fd50f1d031a55f46fb656e1c2985f3a6ca39b48997992de2a9355ad44
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1a85161835d1cc3e87ae05dcb5d2ada4647a360a4df5260f6adc5679db9e1d1b397924e6c6e2933aed87a27dc154d5049178abbbb8e0de1393b6965fa8b8ed02
|
7
|
+
data.tar.gz: 20e3a9416b98321020959cc8f3522d6c07843a78df69428a87291d1f60eb1d2aab2ac9d8bf51ecd0878b1ba69d1aea72465f6cec0126644b3779633a10d2b5d3
|
data/lib/structure.rb
CHANGED
@@ -24,21 +24,18 @@ module Structure
|
|
24
24
|
|
25
25
|
module_eval <<-CODE, __FILE__, __LINE__ + 1
|
26
26
|
def #{name}
|
27
|
-
|
27
|
+
__exclusive {
|
28
28
|
break if @__table.key?("#{name}")
|
29
29
|
|
30
|
-
@__table["#{name}"] =
|
30
|
+
@__table["#{name}"] = __get_#{name}
|
31
31
|
@__table["#{name}"].freeze
|
32
|
-
|
33
|
-
@__table["#{name}"]
|
34
32
|
}
|
35
33
|
|
36
34
|
@__table["#{name}"]
|
37
35
|
end
|
38
36
|
CODE
|
39
37
|
|
40
|
-
define_method "
|
41
|
-
private "__#{name}"
|
38
|
+
private define_method "__get_#{name}", block
|
42
39
|
|
43
40
|
@attribute_names << name
|
44
41
|
|
data/lib/structure/double.rb
CHANGED
data/lib/structure/version.rb
CHANGED