Skip to content

Instantly share code, notes, and snippets.

@mAu888
Last active February 21, 2016 14:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mAu888/3d7e7278d0886dd6fbfa to your computer and use it in GitHub Desktop.
Save mAu888/3d7e7278d0886dd6fbfa to your computer and use it in GitHub Desktop.
class ProfileViewModel {
let apiClient: APIClientType
weak var delegate: ProfileViewModelDelegate?
init(apiClient: APIClientType = APIClient(), delegate: ProfileViewModelDelegate) {
self.apiClient = apiClient
self.delegate = delegate
}
func deleteProfile() {
apiClient.delete {
self.delegate?.profileViewModelDidDeleteUser()
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment