class SportsDataApi::Nhl::Player

Constants

GOALIE_POSITION

Public Instance Methods

goalie?() click to toggle source
# File lib/sports_data_api/nhl/player.rb, line 11
def goalie?
  player[:primary_position] == GOALIE_POSITION
end
stats() click to toggle source
# File lib/sports_data_api/nhl/player.rb, line 6
def stats
  return if player[stats_key].nil? || player[stats_key].empty?
  @stats ||= SportsDataApi::MergedStats.new(player[stats_key])
end

Private Instance Methods

stats_key() click to toggle source
# File lib/sports_data_api/nhl/player.rb, line 17
def stats_key
  goalie? ? :goaltending : :statistics
end