class Sportradar::Nfl::Models::PlayAdvancement
Public Class Methods
new(play:, attributes:)
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 5 def initialize(play:, attributes:) @play = play @attributes = attributes end
Public Instance Methods
from_side_team()
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 42 def from_side_team @attributes.dig('from', 'side') end
from_yard_line()
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 46 def from_yard_line @attributes.dig('from', 'yard_line') end
id()
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 22 def id @play.id end
sequence()
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 26 def sequence @attributes['sequence'] end
team()
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 34 def team @attributes['team'] end
to_s()
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 10 def to_s [ type, from_side_team, from_yard_line, to_side_team, to_yard_line, yards ].compact. join(' ') end
to_side_team()
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 50 def to_side_team @attributes.dig('to', 'side') end
to_yard_line()
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 54 def to_yard_line @attributes.dig('to', 'yard_line') end
type()
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 30 def type @attributes['type'] end
yards()
click to toggle source
# File lib/sportradar/nfl/models/play_advancement.rb, line 38 def yards @attributes['yards'] end