From 60bf898e1bf77b6978fb3c2711ce7eb1255ab789 Mon Sep 17 00:00:00 2001 From: zuchie Date: Wed, 21 Feb 2018 13:00:15 -0800 Subject: [PATCH 1/2] Make ResourceIdentifier.type/id/toDictionary() public access level. --- Spine/Resource.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Spine/Resource.swift b/Spine/Resource.swift index d2fda3bf..90398a34 100644 --- a/Spine/Resource.swift +++ b/Spine/Resource.swift @@ -13,10 +13,10 @@ public typealias ResourceType = String /// A ResourceIdentifier uniquely identifies a resource that exists on the server. public struct ResourceIdentifier: Equatable { /// The resource type. - var type: ResourceType + public var type: ResourceType /// The resource ID. - var id: String + public var id: String /// Constructs a new ResourceIdentifier instance with given `type` and `id`. init(type: ResourceType, id: String) { @@ -32,7 +32,7 @@ public struct ResourceIdentifier: Equatable { } /// Returns a dictionary with "type" and "id" keys containing the type and id. - func toDictionary() -> NSDictionary { + public func toDictionary() -> NSDictionary { return ["type": type, "id": id] } } From 71bdbffe9e0b10f09747cc9be5749e579e5b3512 Mon Sep 17 00:00:00 2001 From: zuchie Date: Fri, 23 Feb 2018 12:59:26 -0800 Subject: [PATCH 2/2] Expose getters only. --- Spine/Resource.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Spine/Resource.swift b/Spine/Resource.swift index 90398a34..07d607de 100644 --- a/Spine/Resource.swift +++ b/Spine/Resource.swift @@ -13,10 +13,10 @@ public typealias ResourceType = String /// A ResourceIdentifier uniquely identifies a resource that exists on the server. public struct ResourceIdentifier: Equatable { /// The resource type. - public var type: ResourceType + public private(set) var type: ResourceType /// The resource ID. - public var id: String + public private(set) var id: String /// Constructs a new ResourceIdentifier instance with given `type` and `id`. init(type: ResourceType, id: String) {