Last active
February 3, 2019 20:07
-
-
Save nicol3a/6d0fc47a957b2e4e019ac164fde7b8e9 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
@objc(EventManagedObject) | |
public class EventManagedObject: NSManagedObject, ManagedObjectConvertible { | |
typealias T = Event | |
func from(object: Event) { | |
title = object.title | |
date = object.date | |
} | |
func toObject() -> Event { | |
return Event( | |
title: title ?? "", | |
lastDate: date, | |
identifier: identifier | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment