Skip to content

Instantly share code, notes, and snippets.

@tieleman
Last active August 4, 2020 09:32
Show Gist options
  • Save tieleman/b075f4840dd8abacc95fc50c7857ace6 to your computer and use it in GitHub Desktop.
Save tieleman/b075f4840dd8abacc95fc50c7857ace6 to your computer and use it in GitHub Desktop.
struct Author {
var firstName: String
var lastName: String
var booksWritten: Int
}
class AuthorViewModel {
private let service = AuthorWebService()
func allAuthors() -> [Author] {
// fetch authors through the service and return them
service.fetchAllAuthors()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment