This commit is contained in:
John Rommel Estropia
2015-02-21 21:14:19 +09:00
parent 23f09fe5a6
commit 061a863235
21 changed files with 248 additions and 258 deletions

View File

@@ -31,9 +31,14 @@ import CoreData
public enum PersistentStoreResult {
// MARK: Public
case Success(NSPersistentStore)
case Failure(NSError)
// MARK: Internal
internal init(_ store: NSPersistentStore) {
self = .Success(store)
@@ -58,13 +63,16 @@ public enum PersistentStoreResult {
}
// MARK: - PersistentStoreResult+BooleanType
// MARK: - PersistentStoreResult: BooleanType
extension PersistentStoreResult: BooleanType {
// MARK: Public
public var boolValue: Bool {
switch self {
case .Success: return true
case .Failure: return false
}