Forked from VictorAlbertos/gist:4a312ccb2f9da5f4b7fb
Last active
August 29, 2015 14:22
-
-
Save beelsebob/294e078d68d24379259d 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 ObjectMapper | |
class News : Mappable { | |
let id: Int | |
let username : String | |
let date: String | |
let share_url: String | |
let image: String | |
let title: String | |
let text: String | |
required init?(_ map: Map) { | |
if let _id = map["id"] { | |
id = _id | |
} else { | |
return nil | |
} | |
... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment