Skip to content

Instantly share code, notes, and snippets.

@vialyx
Created October 17, 2018 19:21
Show Gist options
  • Save vialyx/f786ffde691ab6b926bc97e687415f44 to your computer and use it in GitHub Desktop.
Save vialyx/f786ffde691ab6b926bc97e687415f44 to your computer and use it in GitHub Desktop.
enum TaskType: String, Codable {
case unknown
case activity
}
// MARK: - APIObjectMapping
extension TaskType: APIObjectMapping {
typealias Object = String
static func with(object: String?) -> TaskType? {
return TaskType(rawValue: object ?? "")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment