class Sportradar::Nfl::PlaySummary
Attributes
details[R]
play_id[R]
Public Class Methods
new(year: nil, interval_type: nil, week: 1, away_team_abbreviation: nil, home_team_abbreviation: nil, play_id: nil, details: nil)
click to toggle source
Calls superclass method
Sportradar::Nfl::GameRequest::new
# File lib/sportradar/nfl/play_summary.rb, line 4 def initialize(year: nil, interval_type: nil, week: 1, away_team_abbreviation: nil, home_team_abbreviation: nil, play_id: nil, details: nil) super(year: year, interval_type: interval_type, week: week, away_team_abbreviation: away_team_abbreviation, home_team_abbreviation: home_team_abbreviation) @play_id = play_id @details = details raise ArgumentError.new('A play_id or details path is required.') unless play_id || details end
Public Instance Methods
path()
click to toggle source
# File lib/sportradar/nfl/play_summary.rb, line 22 def path if details details else "#{game_path}/plays/#{play_id}.json" end end