Class: NBA::PlayTypeStat
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::PlayTypeStat
- Defined in:
- lib/nba/play_type_stat.rb
Overview
Represents synergy play type statistics
Instance Attribute Summary collapse
-
#efg_pct ⇒ Float
Returns effective field goal percentage.
-
#fg_pct ⇒ Float
Returns field goal percentage.
-
#fga ⇒ Integer
Returns field goals attempted.
-
#fgm ⇒ Integer
Returns field goals made.
-
#ft_poss_pct ⇒ Float
Returns free throw possession percentage.
-
#gp ⇒ Integer
Returns games played.
-
#percentile ⇒ Float
Returns the percentile ranking.
-
#play_type ⇒ String
Returns the play type.
-
#player_id ⇒ Integer
Returns the player ID.
-
#player_name ⇒ String
Returns the player name.
-
#poss ⇒ Integer
Returns possessions.
-
#poss_pct ⇒ Float
Returns possession percentage.
-
#ppp ⇒ Float
Returns points per possession.
-
#pts ⇒ Integer
Returns points.
-
#pts_pct ⇒ Float
Returns points percentage.
-
#sf_poss_pct ⇒ Float
Returns shooting foul possession percentage.
-
#team_abbreviation ⇒ String
Returns the team abbreviation.
-
#team_id ⇒ Integer
Returns the team ID.
-
#tov_poss_pct ⇒ Float
Returns turnover possession percentage.
-
#type_grouping ⇒ String
Returns the type grouping (Offensive or Defensive).
Instance Method Summary collapse
-
#defensive? ⇒ Boolean
Returns whether this is defensive play type.
-
#offensive? ⇒ Boolean
Returns whether this is offensive play type.
-
#player ⇒ Player?
Returns the player object.
-
#team ⇒ Team?
Returns the team object.
Instance Attribute Details
#efg_pct ⇒ Float
Returns effective field goal percentage
124 |
# File 'lib/nba/play_type_stat.rb', line 124 attribute :efg_pct, Shale::Type::Float |
#fg_pct ⇒ Float
Returns field goal percentage
116 |
# File 'lib/nba/play_type_stat.rb', line 116 attribute :fg_pct, Shale::Type::Float |
#fga ⇒ Integer
Returns field goals attempted
108 |
# File 'lib/nba/play_type_stat.rb', line 108 attribute :fga, Shale::Type::Integer |
#fgm ⇒ Integer
Returns field goals made
100 |
# File 'lib/nba/play_type_stat.rb', line 100 attribute :fgm, Shale::Type::Integer |
#ft_poss_pct ⇒ Float
Returns free throw possession percentage
132 |
# File 'lib/nba/play_type_stat.rb', line 132 attribute :ft_poss_pct, Shale::Type::Float |
#gp ⇒ Integer
Returns games played
60 |
# File 'lib/nba/play_type_stat.rb', line 60 attribute :gp, Shale::Type::Integer |
#percentile ⇒ Float
Returns the percentile ranking
164 |
# File 'lib/nba/play_type_stat.rb', line 164 attribute :percentile, Shale::Type::Float |
#play_type ⇒ String
Returns the play type
44 |
# File 'lib/nba/play_type_stat.rb', line 44 attribute :play_type, Shale::Type::String |
#player_id ⇒ Integer
Returns the player ID
12 |
# File 'lib/nba/play_type_stat.rb', line 12 attribute :player_id, Shale::Type::Integer |
#player_name ⇒ String
Returns the player name
20 |
# File 'lib/nba/play_type_stat.rb', line 20 attribute :player_name, Shale::Type::String |
#poss ⇒ Integer
Returns possessions
68 |
# File 'lib/nba/play_type_stat.rb', line 68 attribute :poss, Shale::Type::Integer |
#poss_pct ⇒ Float
Returns possession percentage
76 |
# File 'lib/nba/play_type_stat.rb', line 76 attribute :poss_pct, Shale::Type::Float |
#ppp ⇒ Float
Returns points per possession
156 |
# File 'lib/nba/play_type_stat.rb', line 156 attribute :ppp, Shale::Type::Float |
#pts ⇒ Integer
Returns points
84 |
# File 'lib/nba/play_type_stat.rb', line 84 attribute :pts, Shale::Type::Integer |
#pts_pct ⇒ Float
Returns points percentage
92 |
# File 'lib/nba/play_type_stat.rb', line 92 attribute :pts_pct, Shale::Type::Float |
#sf_poss_pct ⇒ Float
Returns shooting foul possession percentage
148 |
# File 'lib/nba/play_type_stat.rb', line 148 attribute :sf_poss_pct, Shale::Type::Float |
#team_abbreviation ⇒ String
Returns the team abbreviation
36 |
# File 'lib/nba/play_type_stat.rb', line 36 attribute :team_abbreviation, Shale::Type::String |
#team_id ⇒ Integer
Returns the team ID
28 |
# File 'lib/nba/play_type_stat.rb', line 28 attribute :team_id, Shale::Type::Integer |
#tov_poss_pct ⇒ Float
Returns turnover possession percentage
140 |
# File 'lib/nba/play_type_stat.rb', line 140 attribute :tov_poss_pct, Shale::Type::Float |
#type_grouping ⇒ String
Returns the type grouping (Offensive or Defensive)
52 |
# File 'lib/nba/play_type_stat.rb', line 52 attribute :type_grouping, Shale::Type::String |
Instance Method Details
#defensive? ⇒ Boolean
Returns whether this is defensive play type
202 203 204 |
# File 'lib/nba/play_type_stat.rb', line 202 def defensive? type_grouping.eql?("defensive") end |
#offensive? ⇒ Boolean
Returns whether this is offensive play type
192 193 194 |
# File 'lib/nba/play_type_stat.rb', line 192 def offensive? type_grouping.eql?("offensive") end |
#player ⇒ Player?
Returns the player object
172 173 174 |
# File 'lib/nba/play_type_stat.rb', line 172 def player Players.find(player_id) end |
#team ⇒ Team?
Returns the team object
182 183 184 |
# File 'lib/nba/play_type_stat.rb', line 182 def team Teams.find(team_id) end |