serialized_attr_accessors 0.0.8 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -14,9 +14,14 @@ module SerializedAttrAccessors
14
14
  end
15
15
  end
16
16
 
17
+ #Book keeping of any value changed for any sattr
18
+ def sattr_change_set
19
+ @attr_change_set ||= {}
20
+ end
21
+
17
22
  #Re-sets sattr_change_set
18
23
  def reset_sattr_change_set
19
- self.sattr_change_set.clear if self.respond_to?(:sattr_change_set)
24
+ self.sattr_change_set.clear
20
25
  end
21
26
 
22
27
  base.send(:before_validation, :populate_serialized_attributes)
@@ -64,11 +69,6 @@ module SerializedAttrAccessors
64
69
  #If attributes are not serialized then here is serialization done
65
70
  self.serialize(current_serialized_attr) unless self.serialized_attributes.keys.include?(current_serialized_attr.to_s)
66
71
 
67
- #Book keeping of any value changed for any sattr
68
- define_method :sattr_change_set do
69
- @attr_change_set ||= {}
70
- end
71
-
72
72
  #Defining method to fetch serialzed parent attribute (gives last found)
73
73
  define_method :fetch_parent_attribute do |filed_name|
74
74
  parent_attr = nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serialized_attr_accessors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-12 00:00:00.000000000Z
12
+ date: 2013-05-13 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: attribute accessor generator using sattr_accessor (with default field
15
15
  :serialized_options) or a different serialized field using for_serialized_field