INNER CODE UNIT · Swift

assign

peripheryapp/periphery · Sources/Configuration/Configuration.swift:300

    public func assign(_ newValue: Any) {
        value = setter(newValue) ?? defaultValue
    }
}

private let filePathSetter: (Any) -> FilePath? = { value in
    if let value = value as? FilePath {
        return value
    } else if let value = value as? String {
        return FilePath(value)
    }

    return nil
}

private let filePathArraySetter: (Any) -> [FilePath]? = { value in
    if let value = value as? [FilePath] {
        return value

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…