Skip to content

Commit

Permalink
Merge pull request #1 from robseward/robseward-patch-1
Browse files Browse the repository at this point in the history
Fix code typo
  • Loading branch information
robseward authored Jul 7, 2016
2 parents 8414413 + c4e00b1 commit cf9161f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Let's start by defining the relationship between `UsersNameTableVC` and it's dat

``` swift
protocol UserNamesTableNetworkModelType {
func getUserNames(completion: () -> ([String]))
func getUserNames(completion: ([String]) -> ())
}
```

Expand All @@ -35,7 +35,7 @@ Then we need to have an object that conforms to this in our app:
```swift
class UserNamesTableNetworkModel: UserNamesTableNetworkModelType {

func getUserNames(completion: () -> ([String])) {
func getUserNames(completion: ([String]) -> ()) {
MyNetworkingClient.sharedClient().getUsers { users in
completion(users.map {$0.name})
}
Expand Down Expand Up @@ -65,7 +65,7 @@ OK, so we've abstracted it out a little, this is very similar to what happened b
class StubbedUserNamesTableNetworkModel: UserNamesTableNetworkModelType {

var userNames = []
func getUserNames(completion: () -> ([String])) {
func getUserNames(completion: ([String]) -> ()) {
completion(userNames)
}
}
Expand Down

0 comments on commit cf9161f

Please sign in to comment.