lib/sportradar/api/football/ncaafb/drive.rb in sportradar-api-0.11.15 vs lib/sportradar/api/football/ncaafb/drive.rb in sportradar-api-0.11.16
- old
+ new
@@ -2,9 +2,13 @@
module Api
module Football
class Ncaafb
class Drive < Sportradar::Api::Football::Drive
+ def over?
+ plays.last&.parsed_ending
+ end
+
def handle_plays_and_events(data, **opts)
create_data(@plays_hash, data['actions'], klass: Play, api: api, game: self) if data['actions']
create_data(@events_hash, data['events'], klass: Event, api: api, game: self) if data['events']
end