Class: Sportradar::Api::Football::Nfl::Play

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

Instance Attribute Summary

Attributes inherited from Play

#alt_description, #away_points, #clock, #description, #end_situation, #event_type, #home_points, #id, #play_clock, #play_type, #player_data, #player_id, #players, #reference, #response, #score, #scoring_play, #sequence, #start_situation, #statistics, #team_id, #type, #wall_clock

Instance Method Summary collapse

Methods inherited from Play

#clock_seconds, #counted_play?, #deleted?, #down_distance, #end_of_regulation?, #end_spot, #halftime?, #initialize, #parse_description_for_drive_end, #parse_player, #parsed_ending, #search_for_drive_end, #start_spot, #timeout?, #update, #updated

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::Play

Instance Method Details

#downObject



15
16
17
# File 'lib/sportradar/api/football/nfl/play.rb', line 15

def down
  start_situation.down
end

#play?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/sportradar/api/football/nfl/play.rb', line 7

def play?
  @event_type.nil?
end

#scoring_play?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/sportradar/api/football/nfl/play.rb', line 11

def scoring_play?
  !!@scoring_play
end

#yfdObject



19
20
21
# File 'lib/sportradar/api/football/nfl/play.rb', line 19

def yfd
  start_situation.yfd
end