Class: Bronze::Transform
- Inherits:
-
Object
- Object
- Bronze::Transform
- Defined in:
- lib/bronze/transform.rb
Overview
Abstract class for converting an object to and from a normalized form. This can be a hash for database serialization, an active model object, another object, or any other transformation.
Direct Known Subclasses
Bronze::Transforms::Attributes::BigDecimalTransform, Bronze::Transforms::Attributes::DateTimeTransform, Bronze::Transforms::Attributes::DateTransform, Bronze::Transforms::Attributes::SymbolTransform, Bronze::Transforms::Attributes::TimeTransform, Bronze::Transforms::Entities::NormalizeTransform, Bronze::Transforms::IdentityTransform
Instance Method Summary collapse
-
#denormalize(_object) ⇒ Object
Converts an object from its normalized form.
-
#normalize(_object) ⇒ Object
Converts an object to its normalized form.
Instance Method Details
#denormalize(_object) ⇒ Object
Converts an object from its normalized form.
16 17 18 |
# File 'lib/bronze/transform.rb', line 16 def denormalize(_object) raise Bronze::NotImplementedError.new(self, :denormalize) end |
#normalize(_object) ⇒ Object
Converts an object to its normalized form.
25 26 27 |
# File 'lib/bronze/transform.rb', line 25 def normalize(_object) raise Bronze::NotImplementedError.new(self, :normalize) end |