forked from yonaskolb/XcodeGen
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProjectReference.swift
More file actions
38 lines (32 loc) · 808 Bytes
/
ProjectReference.swift
File metadata and controls
38 lines (32 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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: PathContainer {
static var pathProperties: [PathProperty] {
[
.dictionary([
.string("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 {
[
"path": path,
]
}
}