lib/sportradar/api/football/nfl/drive.rb in sportradar-api-0.11.19 vs lib/sportradar/api/football/nfl/drive.rb in sportradar-api-0.11.20
- old
+ new
@@ -5,12 +5,12 @@
class Drive < Sportradar::Api::Football::Drive
def handle_plays_and_events(data, **opts)
things = (Array(data['events']) + Array(data['actions'])).group_by { |hash| hash['type'] }
- create_data(@plays_hash, things['play'], klass: Play, api: api, game: self) if things['play']
- create_data(@events_hash, things['event'], klass: Event, api: api, game: self) if things['setup']
- create_data(@events_hash, things['event'], klass: Event, api: api, game: self) if things['event']
+ create_data(@plays_hash, things['play'], klass: Play, api: api, drive: self) if things['play']
+ create_data(@events_hash, things['event'], klass: Event, api: api, drive: self) if things['setup']
+ create_data(@events_hash, things['event'], klass: Event, api: api, drive: self) if things['event']
end
end
end
end