class Bronze::Transform

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.

Public Instance Methods

denormalize(_object) click to toggle source

Converts an object from its normalized form.

@param _object [Object] The object to convert.

@return [Object] The converted object.

# File lib/bronze/transform.rb, line 16
def denormalize(_object)
  raise Bronze::NotImplementedError.new(self, :denormalize)
end
normalize(_object) click to toggle source

Converts an object to its normalized form.

@param _object [Object] The entity to convert.

@return [Object] The converted object.

# File lib/bronze/transform.rb, line 25
def normalize(_object)
  raise Bronze::NotImplementedError.new(self, :normalize)
end