Class: Sportradar::Api::Football::Nfl::Event

Inherits:
Event
  • Object
show all
Defined in:
lib/sportradar/api/football/nfl/event.rb

Instance Attribute Summary

Attributes inherited from Event

#alt_description, #clock, #description, #event_type, #id, #reference, #response, #sequence, #type

Class Method Summary collapse

Methods inherited from Event

#events, #halftime?, #initialize, #over?, #plays, #update

Methods inherited from Data

#all_attributes, #attributes, #create_data, #parse_into_array, #parse_into_array_with_options, #parse_out_hashes, #structure_links, #update_data

Constructor Details

This class inherits a constructor from Sportradar::Api::Football::Event

Class Method Details

.new(data, **opts) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/sportradar/api/football/nfl/event.rb', line 7

def self.new(data, **opts)
  if data['type'] == 'play'
    Play.new(data, **opts)
  else
    super(data, **opts)
  end
end