Last active
May 7, 2017 20:30
-
-
Save anuragajwani/4c055a98f86379e9962fe0f8930e4ea9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
private func convert(movies: [Movie]) -> MoviesViewModel { | |
let movieCellViewModels = movies.map { movie in | |
MovieCellViewModel( | |
textLabel: "\(movie.title) (\(movie.year))", | |
detailTextLabel: movie.genre.joined(separator: ", ") | |
) | |
} | |
return MoviesViewModel(movies: movieCellViewModels) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment