latest_games 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/latest_games/cli.rb +17 -10
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b4176df8bb81b8c9cb71b054c037b6f7401a8a6c
|
4
|
+
data.tar.gz: 4e5c13473a219731fcf157c6f1b9690a42f4eb6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e860a7a741be28b5ced6ddb006e53053309d92a5b48780e2e9cceb232bfe13d093bd644a87429e7cb54869e795842b3e0030faf315701446da04b3cdf42ea3f1
|
7
|
+
data.tar.gz: a7a345ed93dc3370858bbc2fb227bb35e8fd3d3ef2457d7cb0187f480be3332cbe1dcf98c5e287d053332ff4688aada5083610beb812aee7554baec6189b46fe
|
data/lib/latest_games/cli.rb
CHANGED
@@ -54,7 +54,8 @@ class LatestGames::CLI
|
|
54
54
|
|
55
55
|
def list_games(platform)
|
56
56
|
input = nil
|
57
|
-
|
57
|
+
puts ""
|
58
|
+
until input == "exit"
|
58
59
|
if platform.is_a? LatestGames::PS4Game
|
59
60
|
puts "*************** Latest PS4 Games ***************"
|
60
61
|
puts ""
|
@@ -68,8 +69,9 @@ class LatestGames::CLI
|
|
68
69
|
game = LatestGames::PS4Game.find(input.to_i)
|
69
70
|
if input != "exit"
|
70
71
|
select_game(game, "PS4")
|
72
|
+
elsif input == "exit"
|
73
|
+
end_program
|
71
74
|
end
|
72
|
-
end_program
|
73
75
|
|
74
76
|
elsif platform.is_a? LatestGames::IOSGame
|
75
77
|
puts "*************** Latest iOS Games ***************"
|
@@ -84,8 +86,9 @@ class LatestGames::CLI
|
|
84
86
|
game = LatestGames::IOSGame.find(input.to_i)
|
85
87
|
if input != "exit"
|
86
88
|
select_game(game, "iOS")
|
89
|
+
elsif input == "exit"
|
90
|
+
end_program
|
87
91
|
end
|
88
|
-
end_program
|
89
92
|
|
90
93
|
elsif platform.is_a? LatestGames::XboneGame
|
91
94
|
puts "************* Latest Xbox One Games ************"
|
@@ -100,8 +103,9 @@ class LatestGames::CLI
|
|
100
103
|
game = LatestGames::XboneGame.find(input.to_i)
|
101
104
|
if input != "exit"
|
102
105
|
select_game(game, "Xbox One")
|
106
|
+
elsif input == "exit"
|
107
|
+
end_program
|
103
108
|
end
|
104
|
-
end_program
|
105
109
|
|
106
110
|
elsif platform.is_a? LatestGames::PCGame
|
107
111
|
puts "*************** Latest PC Games ****************"
|
@@ -116,8 +120,9 @@ class LatestGames::CLI
|
|
116
120
|
game = LatestGames::PCGame.find(input.to_i)
|
117
121
|
if input != "exit"
|
118
122
|
select_game(game, "PC")
|
123
|
+
elsif input == "exit"
|
124
|
+
end_program
|
119
125
|
end
|
120
|
-
end_program
|
121
126
|
|
122
127
|
elsif platform.is_a? LatestGames::SwitchGame
|
123
128
|
puts "************* Latest Switch Games **************"
|
@@ -132,21 +137,23 @@ class LatestGames::CLI
|
|
132
137
|
game = LatestGames::SwitchGame.find(input.to_i)
|
133
138
|
if input != "exit"
|
134
139
|
select_game(game, "Switch")
|
140
|
+
elsif input == "exit"
|
141
|
+
end_program
|
135
142
|
end
|
136
|
-
end_program
|
137
143
|
|
138
144
|
end
|
145
|
+
end
|
139
146
|
end_program
|
140
147
|
end
|
141
148
|
|
142
|
-
def select_game(game,
|
149
|
+
def select_game(game, platformname)
|
143
150
|
puts ""
|
144
|
-
puts "------- #{game.name} - #{
|
151
|
+
puts "------- #{game.name} - #{platformname} -------"
|
145
152
|
puts ""
|
146
153
|
puts "Publisher: #{game.publisher}"
|
147
154
|
puts "Release Date: #{game.release_date}"
|
148
155
|
if game.also_on == ""
|
149
|
-
puts "Only on #{
|
156
|
+
puts "Only on #{platformname}"
|
150
157
|
else
|
151
158
|
puts "Also On: #{game.also_on}"
|
152
159
|
end
|
@@ -169,7 +176,7 @@ class LatestGames::CLI
|
|
169
176
|
puts ""
|
170
177
|
puts "--------------------"
|
171
178
|
puts ""
|
172
|
-
puts "Would you like to check out another #{
|
179
|
+
puts "Would you like to check out another #{platformname} game? (y/n)"
|
173
180
|
input = gets.strip
|
174
181
|
if input.downcase == "n" || input.downcase == "no"
|
175
182
|
self.start
|