flexserializer 1.2.2 → 1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/flexserializer/base.rb +2 -7
- data/lib/flexserializer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8356865dbed8bf284e5c22993eb6295660ed2a61
|
4
|
+
data.tar.gz: ffe731f331b8a86cfb106e4d37b555636d7ba65e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9704b74676ce33de4cbe3a91b27ae8ebca5c4ff0c5386b620b3ed6efed206d7a0ff49204ce54f77ff426bd5b754e0f7120c642e510ad180bc89e1b0359a7224a
|
7
|
+
data.tar.gz: 206140aca629eab25e43bb076a9f01edd5b26b3f137579fca8ab05d632697630becf95aca1deed1ea3d07ceee19a34131706873bab68020c933aaf182455a317
|
data/lib/flexserializer/base.rb
CHANGED
@@ -35,17 +35,12 @@ module Flexserializer
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def define_default_attrs
|
38
|
-
return
|
38
|
+
return unless self.class.data_default_attributes
|
39
39
|
self.class.data_default_attributes.call
|
40
40
|
end
|
41
41
|
|
42
42
|
def define_group_attrs
|
43
|
-
|
44
|
-
if !self.class.groups or !self.class.groups.keys.include?(group_name)
|
45
|
-
p "group_name #{group_name} - inst:#{self.object_id} - #{self.class.object_id}"
|
46
|
-
p self.class
|
47
|
-
return
|
48
|
-
end
|
43
|
+
return unless self.class.groups or self.class.groups.keys.include?(group_name)
|
49
44
|
self.class.groups[group_name].each { |block| block.call }
|
50
45
|
end
|
51
46
|
end
|