lib/sportradar/api/football/ncaafb/game.rb in sportradar-api-0.11.12 vs lib/sportradar/api/football/ncaafb/game.rb in sportradar-api-0.11.13
- old
+ new
@@ -62,9 +62,18 @@
check_newness(:box, @clock)
check_newness(:score, @score)
data
end
+ def ingest_pbp(data)
+ super.tap {
+ clock = self.plays.last&.clock
+ quarter = self.quarters.last&.number
+ @clock = clock if clock
+ @quarter = quarter if quarter
+ }
+ end
+
def team_class
Team
end
def period_class
Quarter