24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/new_game_scores/cli.rb', line 24
def start
welcome
input = nil
while input != 'exit'
puts ""
puts "Please type the number or the name of the platform that you would like to see the latest reviews for."
puts ""
puts "If you would like to exit the program please type 'Exit'."
puts ""
input = gets.strip.upcase
if input == "PS4" || input == "1"
list("PS4", "http://www.metacritic.com/browse/games/release-date/new-releases/ps4/metascore")
elsif input == "XBOX ONE" || input == "2"
list("Xbox One", "http://www.metacritic.com/browse/games/release-date/new-releases/xboxone/metascore")
elsif input == "PC" || input == "3"
list("PC", "http://www.metacritic.com/browse/games/release-date/new-releases/pc/metascore")
elsif input == "WII U" || input == "4"
list("Wii U", "http://www.metacritic.com/browse/games/release-date/new-releases/wii-u/metascore")
elsif input == "3DS" || input == "5"
list("3ds", "http://www.metacritic.com/browse/games/release-date/new-releases/3ds/metascore")
elsif input == "EXIT"
puts "Goodbye!"
exit == true
end
end
end
|