lib/sportradar/api/soccer/player.rb in sportradar-api-0.16.1 vs lib/sportradar/api/soccer/player.rb in sportradar-api-0.17.0.pre
- old
+ new
@@ -38,12 +38,14 @@
@matches_played = data['matches_played'] if data['matches_played']
@stats = data['statistics'] if data['statistics']
@date_of_birth = Date.parse(data['date_of_birth']) if data['date_of_birth']
set_game_stats(data)
- @team.update_player_stats(self, data['statistics']) if data['statistics'] && @team
- if opts[:match]
- @team.update_player_stats(self, data, opts[:match])
+ if data['statistics'] && @team
+ @team.update_player_stats(self, data['statistics'])
+ if opts[:match]
+ @team.update_player_stats(self, data['statistics'], opts[:match])
+ end
end
end
def set_game_stats(data)