Created
March 2, 2019 14:59
-
-
Save Kmohamed/2bf3021ed15a42b6a6ba241a71157dc8 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
public func moviesCount() -> Int { | |
return self.movies.count | |
} | |
func movieName(index:Int) -> String { | |
let movie = self.movies[index] | |
if let movieName = movie.name { | |
return movieName | |
} | |
return "" | |
} | |
func movieRatting(index:Int) -> String { | |
let movie = self.movies[index] | |
if let movieRatting = movie.rating { | |
return movieRatting | |
} | |
return "" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment