Skip to content

Instantly share code, notes, and snippets.

@beelsebob
Forked from VictorAlbertos/gist:4a312ccb2f9da5f4b7fb
Last active August 29, 2015 14:22
Show Gist options
  • Save beelsebob/294e078d68d24379259d to your computer and use it in GitHub Desktop.
Save beelsebob/294e078d68d24379259d to your computer and use it in GitHub Desktop.
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