class Sportradar::Nhl::Models::ScoringPlayer

Public Instance Methods

role() click to toggle source
# File lib/sportradar/nhl/models/scoring_player.rb, line 5
def role
  if goal? && type == 'shot'
    'scorer'
  elsif goal? && type == 'shotagainst' && !saved?
    'goalie'
  else
    type
  end
end
scoring_play_id() click to toggle source
# File lib/sportradar/nhl/models/scoring_player.rb, line 15
def scoring_play_id
  event.id
end
to_s() click to toggle source
# File lib/sportradar/nhl/models/scoring_player.rb, line 19
def to_s
  "#{super} - #{role}"
end