From 06c0981ded380eb169b2569fc6f46afd75412f2d Mon Sep 17 00:00:00 2001 From: John Estropia Date: Mon, 24 Sep 2018 00:49:53 +0900 Subject: [PATCH] debug string for CoreStoreObject --- ...reStore+CustomDebugStringConvertible.swift | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/Sources/CoreStore+CustomDebugStringConvertible.swift b/Sources/CoreStore+CustomDebugStringConvertible.swift index cd0dbdc..0ff72f5 100644 --- a/Sources/CoreStore+CustomDebugStringConvertible.swift +++ b/Sources/CoreStore+CustomDebugStringConvertible.swift @@ -158,6 +158,30 @@ extension CoreStoreError: CustomDebugStringConvertible, CoreStoreDebugStringConv } +// MARK: - CoreStoreObject + +extension CoreStoreObject: CustomDebugStringConvertible, CoreStoreDebugStringConvertible { + + // MARK: CustomDebugStringConvertible + + public var debugDescription: String { + + return formattedDebugDescription(self) + } + + + // MARK: CoreStoreDebugStringConvertible + + public var coreStoreDumpString: String { + + return createFormattedString( + "(", ")", + ("rawObject", self.rawObject as Any) + ) + } +} + + // MARK: - CoreStoreSchema extension CoreStoreSchema: CustomDebugStringConvertible, CoreStoreDebugStringConvertible {