Class: NBA::BoxScoreFourFactorsPlayerStat
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::BoxScoreFourFactorsPlayerStat
- Defined in:
- lib/nba/box_score_four_factors_player_stat.rb
Overview
Represents a player’s four factors box score statistics for a game
Instance Attribute Summary collapse
-
#comment ⇒ String
Returns any comment (e.g., “DNP - Rest”).
-
#efg_pct ⇒ Float
Returns effective field goal percentage.
-
#fta_rate ⇒ Float
Returns free throw attempt rate.
-
#game_id ⇒ String
Returns the game ID.
-
#min ⇒ String
Returns minutes played.
-
#opp_efg_pct ⇒ Float
Returns opponent effective field goal percentage.
-
#opp_fta_rate ⇒ Float
Returns opponent free throw attempt rate.
-
#opp_oreb_pct ⇒ Float
Returns opponent offensive rebound percentage.
-
#opp_tov_pct ⇒ Float
Returns opponent turnover percentage.
-
#oreb_pct ⇒ Float
Returns offensive rebound percentage.
-
#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.
-
#tov_pct ⇒ Float
Returns turnover 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_four_factors_player_stat.rb', line 71 attribute :comment, Shale::Type::String |
#efg_pct ⇒ Float
Returns effective field goal percentage
87 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 87 attribute :efg_pct, Shale::Type::Float |
#fta_rate ⇒ Float
Returns free throw attempt rate
95 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 95 attribute :fta_rate, Shale::Type::Float |
#game_id ⇒ String
Returns the game ID
15 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 15 attribute :game_id, Shale::Type::String |
#min ⇒ String
Returns minutes played
79 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 79 attribute :min, Shale::Type::String |
#opp_efg_pct ⇒ Float
Returns opponent effective field goal percentage
119 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 119 attribute :opp_efg_pct, Shale::Type::Float |
#opp_fta_rate ⇒ Float
Returns opponent free throw attempt rate
127 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 127 attribute :opp_fta_rate, Shale::Type::Float |
#opp_oreb_pct ⇒ Float
Returns opponent offensive rebound percentage
143 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 143 attribute :opp_oreb_pct, Shale::Type::Float |
#opp_tov_pct ⇒ Float
Returns opponent turnover percentage
135 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 135 attribute :opp_tov_pct, Shale::Type::Float |
#oreb_pct ⇒ Float
Returns offensive rebound percentage
111 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 111 attribute :oreb_pct, Shale::Type::Float |
#player_id ⇒ Integer
Returns the player ID
47 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 47 attribute :player_id, Shale::Type::Integer |
#player_name ⇒ String
Returns the player name
55 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 55 attribute :player_name, Shale::Type::String |
#start_position ⇒ String
Returns the starting position
63 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 63 attribute :start_position, Shale::Type::String |
#team_abbreviation ⇒ String
Returns the team abbreviation
31 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 31 attribute :team_abbreviation, Shale::Type::String |
#team_city ⇒ String
Returns the team city
39 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 39 attribute :team_city, Shale::Type::String |
#team_id ⇒ Integer
Returns the team ID
23 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 23 attribute :team_id, Shale::Type::Integer |
#tov_pct ⇒ Float
Returns turnover percentage
103 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 103 attribute :tov_pct, Shale::Type::Float |
Instance Method Details
#game ⇒ Game?
Returns the game object for this box score
181 182 183 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 181 def game Games.find(game_id) end |
#player ⇒ Player?
Returns the player object
151 152 153 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 151 def player Players.find(player_id) end |
#starter? ⇒ Boolean
Returns whether the player started the game
171 172 173 |
# File 'lib/nba/box_score_four_factors_player_stat.rb', line 171 def starter? !start_position.nil? && !start_position.empty? end |