Created
March 26, 2019 02:38
-
-
Save coffeejay/390a62943c0e26cf44704900ad7e1c90 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
json = response.parsed_response | |
matchup = json.select { |s| s["Week"] == week.to_s && (s["team_1_name"] == @player.team || s["team_2_name"] == @player.team) } | |
matchup.each { |h| h.each { |k,v| game_ids << v if v && /game_\d_id/ =~ k } } | |
is_final = matchup.length > 0 && matchup.first["winning_team_id"].present? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment