Files
XcodeGen/Sources/ProjectSpec/ProjectReference.swift
T
2019-10-27 09:23:35 +09:00

28 lines
618 B
Swift

import Foundation
import JSONUtilities
public struct ProjectReference: Hashable {
public var name: String
public var path: String
public init(name: String, path: String) {
self.name = name
self.path = path
}
}
extension ProjectReference: NamedJSONDictionaryConvertible {
public init(name: String, jsonDictionary: JSONDictionary) throws {
self.name = name
self.path = try jsonDictionary.json(atKeyPath: "path")
}
}
extension ProjectReference: JSONEncodable {
public func toJSONValue() -> Any {
return [
"path": path,
]
}
}