-
-
Save ennioma/81d5cedfc9bfbae660b0845e764c4f32 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
import RealmSwift | |
class FooObject { | |
let context: StorageContext | |
init(context: StorageContext) { | |
self.context = context | |
} | |
func dummyMethod(completion: @escaping ((Bool) -> Void)) { | |
self.context.fetch(Object.self, predicate: nil, sorted: nil) { (objects) in | |
(objects.count > 10) ? completion(true) : completion(false) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment