expose DataStack vars to CoreStore

This commit is contained in:
John Estropia
2015-08-18 21:49:40 +09:00
parent 8c6a7df731
commit 62b11309f3

View File

@@ -32,6 +32,22 @@ import GCDKit
public extension CoreStore {
/**
Returns the `defaultStack`'s model version. The version string is the same as the name of the version-specific .xcdatamodeld file.
*/
public static var modelVersion: String {
return self.defaultStack.modelVersion
}
/**
Returns the entity name-to-class type mapping from the `defaultStack`'s model.
*/
public static var entitiesByName: [String: NSManagedObject.Type] {
return self.defaultStack.entitiesByName
}
/**
Adds an in-memory store to the `defaultStack`.