File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5,17 +5,17 @@ import Foundation
55/// Simple struct used to represent multiple segments of a string.
66/// This is a utility used to recursively access values in nested dictionaries.
77public struct KeyPath {
8- var segments : [ String ]
8+ public var segments : [ String ]
99
10- var isEmpty : Bool { return segments. isEmpty }
11- var path : String {
10+ public var isEmpty : Bool { return segments. isEmpty }
11+ public var path : String {
1212 return segments. joined ( separator: " . " )
1313 }
1414
1515 /// Strips off the first segment and returns a pair
1616 /// consisting of the first segment and the remaining key path.
1717 /// Returns nil if the key path has no segments.
18- func headAndTail( ) -> ( head: String , tail: KeyPath ) ? {
18+ public func headAndTail( ) -> ( head: String , tail: KeyPath ) ? {
1919 guard !isEmpty else { return nil }
2020 var tail = segments
2121 let head = tail. removeFirst ( )
You can’t perform that action at this time.
0 commit comments