Module: Sequel::Plugins::Serialization::InstanceMethods
- Defined in:
- lib/sequel/plugins/serialization.rb
Instance Method Summary collapse
-
#before_validation ⇒ Object
Serialize deserialized values before saving.
-
#deserialized_values ⇒ Object
Hash of deserialized values, used as a cache.
-
#freeze ⇒ Object
Freeze the deserialized values.
Instance Method Details
#before_validation ⇒ Object
Serialize deserialized values before saving
197 198 199 200 |
# File 'lib/sequel/plugins/serialization.rb', line 197 def before_validation serialize_deserialized_values super end |
#deserialized_values ⇒ Object
Hash of deserialized values, used as a cache.
184 185 186 |
# File 'lib/sequel/plugins/serialization.rb', line 184 def deserialized_values @deserialized_values ||= {} end |
#freeze ⇒ Object
Freeze the deserialized values
189 190 191 192 193 194 |
# File 'lib/sequel/plugins/serialization.rb', line 189 def freeze deserialized_values super deserialized_values.freeze self end |