Last active
May 9, 2018 22:08
-
-
Save IgorMuzyka/588be13ada2295e4c9853c7e78875462 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
struct Person: Codable { // your type conforming to Codable | |
let id: String | |
let name: String | |
let age: Int | |
} | |
extension Person: RestorablePersistable { // confroming your type to get those convenient methods | |
static let fileExtension: String = ".person" | |
var fileName: String { return id } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment