Class: NbaRb::Game::BoxscoreScoring
Instance Attribute Summary
Attributes inherited from Boxscore
#data, #end_period, #end_range, #game_id, #range_type, #start_period, #start_range
Instance Method Summary
collapse
Methods inherited from Boxscore
#initialize, #player_stats, #team_starter_bench_stats, #team_stats
#stats_request
#initialize
Methods included from StatsHash
#create_stats_hash
Instance Method Details
#endpoint ⇒ Object
6
7
8
|
# File 'lib/nba_rb/game/boxscore_scoring.rb', line 6
def endpoint
self.class.endpoint
end
|
#matchup ⇒ Object
10
11
12
13
14
15
|
# File 'lib/nba_rb/game/boxscore_scoring.rb', line 10
def matchup
scores = players_scoring
home_team = scores[0]['TEAM_ABBREVIATION']
away_team = scores.last['TEAM_ABBREVIATION']
"#{away_team} @ #{home_team}"
end
|
#players_scoring ⇒ Object
17
18
19
|
# File 'lib/nba_rb/game/boxscore_scoring.rb', line 17
def players_scoring
create_stats_hash(@data[0])
end
|
#team_scoring ⇒ Object
21
22
23
|
# File 'lib/nba_rb/game/boxscore_scoring.rb', line 21
def team_scoring
create_stats_hash(@data[1])
end
|