Transformer

open class Transformer<FromType, ToType> : NSObject, TransformerProtocol

Inherit this class as to create your transformers. You should pass FromType and ToType (generic types) in your subclass definition.

  • This is the default transform method. This method should be overriden by subclass

    Declaration

    Swift

    open func transform(_ object: FromType) throws -> ToType

    Parameters

    object

    The object that will be transformed

    Return Value

    The transformed object

  • Default initializer

    Declaration

    Swift

    required public override init()