Class: SportsDataApi::Nhl::Player
Constant Summary
collapse
- GOALIE_POSITION =
'G'.freeze
Instance Method Summary
collapse
Methods inherited from JsonData
#[], #initialize
Instance Method Details
#goalie? ⇒ Boolean
11
12
13
|
# File 'lib/sports_data_api/nhl/player.rb', line 11
def goalie?
player[:primary_position] == GOALIE_POSITION
end
|
#stats ⇒ Object
6
7
8
9
|
# 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
|