Class: NBA::BoxScoreScoringPlayerStat
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::BoxScoreScoringPlayerStat
- Defined in:
- lib/nba/box_score_scoring_player_stat.rb
Overview
Represents a player’s scoring 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_2pm ⇒ Float
Returns percentage of 2-point makes that were assisted.
-
#pct_ast_3pm ⇒ Float
Returns percentage of 3-point makes that were assisted.
-
#pct_ast_fgm ⇒ Float
Returns percentage of field goal makes that were assisted.
-
#pct_fga_2pt ⇒ Float
Returns percentage of field goals from 2-point range.
-
#pct_fga_3pt ⇒ Float
Returns percentage of field goals from 3-point range.
-
#pct_pts_2pt ⇒ Float
Returns percentage of points from 2-point shots.
-
#pct_pts_2pt_mr ⇒ Float
Returns percentage of points from mid-range 2-point shots.
-
#pct_pts_3pt ⇒ Float
Returns percentage of points from 3-point shots.
-
#pct_pts_fb ⇒ Float
Returns percentage of points from fast break.
-
#pct_pts_ft ⇒ Float
Returns percentage of points from free throws.
-
#pct_pts_off_tov ⇒ Float
Returns percentage of points off turnovers.
-
#pct_pts_paint ⇒ Float
Returns percentage of points in the paint.
-
#pct_uast_2pm ⇒ Float
Returns percentage of 2-point makes that were unassisted.
-
#pct_uast_3pm ⇒ Float
Returns percentage of 3-point makes that were unassisted.
-
#pct_uast_fgm ⇒ Float
Returns percentage of field goal makes that were unassisted.
-
#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.
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_scoring_player_stat.rb', line 71 attribute :comment, Shale::Type::String |
#game_id ⇒ String
Returns the game ID
15 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 15 attribute :game_id, Shale::Type::String |
#min ⇒ String
Returns minutes played
79 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 79 attribute :min, Shale::Type::String |
#pct_ast_2pm ⇒ Float
Returns percentage of 2-point makes that were assisted
159 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 159 attribute :pct_ast_2pm, Shale::Type::Float |
#pct_ast_3pm ⇒ Float
Returns percentage of 3-point makes that were assisted
175 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 175 attribute :pct_ast_3pm, Shale::Type::Float |
#pct_ast_fgm ⇒ Float
Returns percentage of field goal makes that were assisted
191 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 191 attribute :pct_ast_fgm, Shale::Type::Float |
#pct_fga_2pt ⇒ Float
Returns percentage of field goals from 2-point range
87 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 87 attribute :pct_fga_2pt, Shale::Type::Float |
#pct_fga_3pt ⇒ Float
Returns percentage of field goals from 3-point range
95 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 95 attribute :pct_fga_3pt, Shale::Type::Float |
#pct_pts_2pt ⇒ Float
Returns percentage of points from 2-point shots
103 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 103 attribute :pct_pts_2pt, Shale::Type::Float |
#pct_pts_2pt_mr ⇒ Float
Returns percentage of points from mid-range 2-point shots
111 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 111 attribute :pct_pts_2pt_mr, Shale::Type::Float |
#pct_pts_3pt ⇒ Float
Returns percentage of points from 3-point shots
119 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 119 attribute :pct_pts_3pt, Shale::Type::Float |
#pct_pts_fb ⇒ Float
Returns percentage of points from fast break
127 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 127 attribute :pct_pts_fb, Shale::Type::Float |
#pct_pts_ft ⇒ Float
Returns percentage of points from free throws
135 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 135 attribute :pct_pts_ft, Shale::Type::Float |
#pct_pts_off_tov ⇒ Float
Returns percentage of points off turnovers
143 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 143 attribute :pct_pts_off_tov, Shale::Type::Float |
#pct_pts_paint ⇒ Float
Returns percentage of points in the paint
151 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 151 attribute :pct_pts_paint, Shale::Type::Float |
#pct_uast_2pm ⇒ Float
Returns percentage of 2-point makes that were unassisted
167 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 167 attribute :pct_uast_2pm, Shale::Type::Float |
#pct_uast_3pm ⇒ Float
Returns percentage of 3-point makes that were unassisted
183 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 183 attribute :pct_uast_3pm, Shale::Type::Float |
#pct_uast_fgm ⇒ Float
Returns percentage of field goal makes that were unassisted
199 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 199 attribute :pct_uast_fgm, Shale::Type::Float |
#player_id ⇒ Integer
Returns the player ID
47 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 47 attribute :player_id, Shale::Type::Integer |
#player_name ⇒ String
Returns the player name
55 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 55 attribute :player_name, Shale::Type::String |
#start_position ⇒ String
Returns the starting position
63 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 63 attribute :start_position, Shale::Type::String |
#team_abbreviation ⇒ String
Returns the team abbreviation
31 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 31 attribute :team_abbreviation, Shale::Type::String |
#team_city ⇒ String
Returns the team city
39 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 39 attribute :team_city, Shale::Type::String |
#team_id ⇒ Integer
Returns the team ID
23 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 23 attribute :team_id, Shale::Type::Integer |
Instance Method Details
#game ⇒ Game?
Returns the game object for this box score
237 238 239 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 237 def game Games.find(game_id) end |
#player ⇒ Player?
Returns the player object
207 208 209 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 207 def player Players.find(player_id) end |
#starter? ⇒ Boolean
Returns whether the player started the game
227 228 229 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 227 def starter? !start_position.nil? && !start_position.empty? end |
#team ⇒ Team?
Returns the team object
217 218 219 |
# File 'lib/nba/box_score_scoring_player_stat.rb', line 217 def team Teams.find(team_id) end |