Class: NbaRb::Game::Hustle
- Defined in:
- lib/nba_rb/game/hustle.rb
Instance Attribute Summary collapse
-
#game_id ⇒ Object
Returns the value of attribute game_id.
Instance Method Summary collapse
- #hustle_stats_available ⇒ Object
- #hustle_stats_player_box_score ⇒ Object
- #hustle_stats_team_box_score ⇒ Object
-
#initialize(*args) ⇒ Hustle
constructor
A new instance of Hustle.
Methods included from StatsRequest
Methods included from StatsHash
Constructor Details
#initialize(*args) ⇒ Hustle
Returns a new instance of Hustle.
8 9 10 11 12 13 14 |
# File 'lib/nba_rb/game/hustle.rb', line 8 def initialize(*args) super(*args) res = stats_request(endpoint, 'GameID' => game_id) @data = res['resultSets'] end |
Instance Attribute Details
#game_id ⇒ Object
Returns the value of attribute game_id.
6 7 8 |
# File 'lib/nba_rb/game/hustle.rb', line 6 def game_id @game_id end |
Instance Method Details
#hustle_stats_available ⇒ Object
16 17 18 |
# File 'lib/nba_rb/game/hustle.rb', line 16 def hustle_stats_available create_stats_hash(@data[0]) end |
#hustle_stats_player_box_score ⇒ Object
20 21 22 |
# File 'lib/nba_rb/game/hustle.rb', line 20 def hustle_stats_player_box_score create_stats_hash(@data[1]) end |
#hustle_stats_team_box_score ⇒ Object
24 25 26 |
# File 'lib/nba_rb/game/hustle.rb', line 24 def hustle_stats_team_box_score create_stats_hash(@data[2]) end |