func transform()

in Plugins/Swift-DocC Convert/Symbolic Links/SwiftDocCPluginUtilities/PluginFlags/PluginFlag.swift [33:47]


    func transform(_ arguments: Arguments) -> Arguments {
        guard !parsedValues.isDisjoint(with: arguments) else {
            // The given parsed arguments do not contain any of this flags
            // parsed values so just return.
            return arguments
        }
        
        // Consume the current flag
        let arguments = arguments.filter { argument in
            !parsedValues.contains(argument)
        }
        
        // Apply the flag to the set of arguments
        return argumentTransformation(arguments)
    }