Last active
February 21, 2016 14:33
-
-
Save mAu888/3d7e7278d0886dd6fbfa 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
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