Class: NBA::BoxScoreUsagePlayerStat
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::BoxScoreUsagePlayerStat
- Defined in:
- lib/nba/box_score_usage_player_stat.rb
Overview
Represents a player’s usage box score statistics for a game
Instance Attribute Summary collapse
-
#comment ⇒ String
Returns any comment (e.g., “DNP - Rest”).
-
#game_id ⇒ String
Returns the game ID.
-
#min ⇒ String
Returns minutes played.
-
#pct_ast ⇒ Float
Returns percentage of team assists.
-
#pct_blk ⇒ Float
Returns percentage of team blocks.
-
#pct_blka ⇒ Float
Returns percentage of team blocked attempts.
-
#pct_dreb ⇒ Float
Returns percentage of team defensive rebounds.
-
#pct_fg3a ⇒ Float
Returns percentage of team 3-pointers attempted.
-
#pct_fg3m ⇒ Float
Returns percentage of team 3-pointers made.
-
#pct_fga ⇒ Float
Returns percentage of team field goals attempted.
-
#pct_fgm ⇒ Float
Returns percentage of team field goals made.
-
#pct_fta ⇒ Float
Returns percentage of team free throws attempted.
-
#pct_ftm ⇒ Float
Returns percentage of team free throws made.
-
#pct_oreb ⇒ Float
Returns percentage of team offensive rebounds.
-
#pct_pf ⇒ Float
Returns percentage of team personal fouls.
-
#pct_pfd ⇒ Float
Returns percentage of team personal fouls drawn.
-
#pct_pts ⇒ Float
Returns percentage of team points.
-
#pct_reb ⇒ Float
Returns percentage of team total rebounds.
-
#pct_stl ⇒ Float
Returns percentage of team steals.
-
#pct_tov ⇒ Float
Returns percentage of team turnovers.
-
#player_id ⇒ Integer
Returns the player ID.
-
#player_name ⇒ String
Returns the player name.
-
#start_position ⇒ String
Returns the starting position.
-
#team_abbreviation ⇒ String
Returns the team abbreviation.
-
#team_city ⇒ String
Returns the team city.
-
#team_id ⇒ Integer
Returns the team ID.
-
#usg_pct ⇒ Float
Returns usage percentage.
Instance Method Summary collapse
-
#game ⇒ Game?
Returns the game object for this box score.
-
#player ⇒ Player?
Returns the player object.
-
#starter? ⇒ Boolean
Returns whether the player started the game.
-
#team ⇒ Team?
Returns the team object.
Instance Attribute Details
#comment ⇒ String
Returns any comment (e.g., “DNP - Rest”)
71 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 71 attribute :comment, Shale::Type::String |
#game_id ⇒ String
Returns the game ID
15 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 15 attribute :game_id, Shale::Type::String |
#min ⇒ String
Returns minutes played
79 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 79 attribute :min, Shale::Type::String |
#pct_ast ⇒ Float
Returns percentage of team assists
167 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 167 attribute :pct_ast, Shale::Type::Float |
#pct_blk ⇒ Float
Returns percentage of team blocks
191 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 191 attribute :pct_blk, Shale::Type::Float |
#pct_blka ⇒ Float
Returns percentage of team blocked attempts
199 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 199 attribute :pct_blka, Shale::Type::Float |
#pct_dreb ⇒ Float
Returns percentage of team defensive rebounds
151 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 151 attribute :pct_dreb, Shale::Type::Float |
#pct_fg3a ⇒ Float
Returns percentage of team 3-pointers attempted
119 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 119 attribute :pct_fg3a, Shale::Type::Float |
#pct_fg3m ⇒ Float
Returns percentage of team 3-pointers made
111 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 111 attribute :pct_fg3m, Shale::Type::Float |
#pct_fga ⇒ Float
Returns percentage of team field goals attempted
103 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 103 attribute :pct_fga, Shale::Type::Float |
#pct_fgm ⇒ Float
Returns percentage of team field goals made
95 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 95 attribute :pct_fgm, Shale::Type::Float |
#pct_fta ⇒ Float
Returns percentage of team free throws attempted
135 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 135 attribute :pct_fta, Shale::Type::Float |
#pct_ftm ⇒ Float
Returns percentage of team free throws made
127 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 127 attribute :pct_ftm, Shale::Type::Float |
#pct_oreb ⇒ Float
Returns percentage of team offensive rebounds
143 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 143 attribute :pct_oreb, Shale::Type::Float |
#pct_pf ⇒ Float
Returns percentage of team personal fouls
207 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 207 attribute :pct_pf, Shale::Type::Float |
#pct_pfd ⇒ Float
Returns percentage of team personal fouls drawn
215 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 215 attribute :pct_pfd, Shale::Type::Float |
#pct_pts ⇒ Float
Returns percentage of team points
223 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 223 attribute :pct_pts, Shale::Type::Float |
#pct_reb ⇒ Float
Returns percentage of team total rebounds
159 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 159 attribute :pct_reb, Shale::Type::Float |
#pct_stl ⇒ Float
Returns percentage of team steals
183 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 183 attribute :pct_stl, Shale::Type::Float |
#pct_tov ⇒ Float
Returns percentage of team turnovers
175 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 175 attribute :pct_tov, Shale::Type::Float |
#player_id ⇒ Integer
Returns the player ID
47 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 47 attribute :player_id, Shale::Type::Integer |
#player_name ⇒ String
Returns the player name
55 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 55 attribute :player_name, Shale::Type::String |
#start_position ⇒ String
Returns the starting position
63 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 63 attribute :start_position, Shale::Type::String |
#team_abbreviation ⇒ String
Returns the team abbreviation
31 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 31 attribute :team_abbreviation, Shale::Type::String |
#team_city ⇒ String
Returns the team city
39 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 39 attribute :team_city, Shale::Type::String |
#team_id ⇒ Integer
Returns the team ID
23 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 23 attribute :team_id, Shale::Type::Integer |
#usg_pct ⇒ Float
Returns usage percentage
87 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 87 attribute :usg_pct, Shale::Type::Float |
Instance Method Details
#game ⇒ Game?
Returns the game object for this box score
261 262 263 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 261 def game Games.find(game_id) end |
#player ⇒ Player?
Returns the player object
231 232 233 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 231 def player Players.find(player_id) end |
#starter? ⇒ Boolean
Returns whether the player started the game
251 252 253 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 251 def starter? !start_position.nil? && !start_position.empty? end |
#team ⇒ Team?
Returns the team object
241 242 243 |
# File 'lib/nba/box_score_usage_player_stat.rb', line 241 def team Teams.find(team_id) end |