WIP: Updating README and other docs. Some minor fixes

This commit is contained in:
John Rommel Estropia
2017-05-22 01:27:38 +09:00
parent da3a9590ac
commit b9b96d1a35
13 changed files with 380 additions and 326 deletions

View File

@@ -48,6 +48,11 @@ public protocol DynamicObject: class {
*/
static func cs_matches(object: NSManagedObject) -> Bool
/**
Used internally by CoreStore. Do not call directly.
*/
func cs_id() -> NSManagedObjectID
/**
Used internally by CoreStore. Do not call directly.
*/
@@ -86,6 +91,11 @@ extension NSManagedObject: DynamicObject {
return object.isKind(of: self)
}
public func cs_id() -> NSManagedObjectID {
return self.objectID
}
public func cs_toRaw() -> NSManagedObject {
return self
@@ -135,6 +145,11 @@ extension CoreStoreObject {
return (self as AnyClass).isSubclass(of: type as AnyClass)
}
public func cs_id() -> NSManagedObjectID {
return self.rawObject!.objectID
}
public func cs_toRaw() -> NSManagedObject {
return self.rawObject!