InlineContextTransformer

public final class InlineContextTransformer<SourceContext, TargetContext> : ContextTransformer

InlineContextTransformer

NB: It may be used for the purpose of configuration testing, but then replaced with a strongly typed ContextTransformer instance.

Methods

  • Constructor

    Declaration

    Swift

    public init(_ transformationBlock: @escaping (SourceContext) throws -> TargetContext)

    Parameters

    transformationBlock

    the block to be called when it requested to transform the context.

  • Declaration

    Swift

    public func transform(_ context: SourceContext) throws -> TargetContext