RecordModifier

public struct RecordModifier

A RecordModifier defines the modification of a Record

  • This init is based on a Records keyPath and allows just to modify a specific property of a Record.

    Declaration

    Swift

    public init<Type>(keyPath: WritableKeyPath<Record, Type>, modifier: @escaping (Type) -> (Type))

    Parameters

    keyPath

    The keyPath describing which property of a Record should be modified.

    modifier

    A closure used to modify the property defined by the keyPath.

    Return Value

    A RecordModifier is modifying a specific property of a Record. Used for example to initalize a FindReplaceFloret.

  • This init will modify the Requests URL.

    Declaration

    Swift

    public static func modifyUrl(expression: NSRegularExpression, template: String) -> RecordModifier

    Parameters

    expression

    A RegularExpression describing the part of the Requets URL to modify.

    template

    The substitution template used when replacing matching instances of the expression.

    Return Value

    A RecordModifier is modifying the RequestURL. Used to initalize a FindReplaceFloret.