Skip to content

Instantly share code, notes, and snippets.

@bobgodwinx
Created May 30, 2018 09:09
Show Gist options
  • Select an option

  • Save bobgodwinx/19983a2dc735f2267ce858bfb7562e2e to your computer and use it in GitHub Desktop.

Select an option

Save bobgodwinx/19983a2dc735f2267ce858bfb7562e2e to your computer and use it in GitHub Desktop.
S4D03
/// `ContactProvider` = `Model`
class ContactProvider: ContactProviderType {
let contacts: Observable<Set<Person>>
init() {
/// Only Leader and the richest
/// Disclaimer this data is just
/// for example purposes. I am not
/// responsible for any incorrect
/// information. I hereby declare
/// that I should not be held liable.
self.contacts = Observable.of([
Person(firstName: "Angela", lastName: "Merkel", age: 64, nationality: .german),
Person(firstName: "Theresa", lastName: "May", age: 61, nationality: .british),
Person(firstName: "Xi", lastName: "Jinping", age: 65, nationality: .chinese),
Person(firstName: "Muhammadu", lastName: "Buhari", age: 75, nationality: .nigerian),
Person(firstName: "Aliko", lastName: "Dangote", age: 61, nationality: .nigerian),
Person(firstName: "Michele", lastName: "Ferrero", age: 93, nationality: .italian),
Person(firstName: "Jack", lastName: "Ma", age: 53, nationality: .chinese),
Person(firstName: "Silvio", lastName: "Berlusconi", age: 81, nationality: .italian),
Person(firstName: "Richard", lastName: "Brandson", age: 67, nationality: .british),
Person(firstName: "Georg", lastName: "Schaeffler", age: 53, nationality: .german),
])
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment