lib/ahl_scraper/resources/game.rb in ahl_scraper-0.3.1 vs lib/ahl_scraper/resources/game.rb in ahl_scraper-0.3.2
- old
+ new
@@ -342,15 +342,15 @@
def set_game_status
irregular_game_status = IRREGULAR_GAMES.dig(game_id.to_s, :status)
return irregular_game_status if irregular_game_status
- return "postponed" if @raw_data[:details][:status] == "Postponed"
+ return "postponed" if @raw_data.dig(:details, :status) == "Postponed"
# return "forfeited" if game is a forfeit, need to figure this out if it happens
- return "finished" if @raw_data[:details][:final] == "1"
+ return "finished" if @raw_data.dig(:details, :final) == "1"
- return "in_progress" if @raw_data[:details][:started] == "1"
+ return "in_progress" if @raw_data.dig(:details, :started) == "1"
"not_started"
end
def set_current_game_time