Class: NBA::TeamYearStat
- Inherits:
-
Shale::Mapper
- Object
- Shale::Mapper
- NBA::TeamYearStat
- Defined in:
- lib/nba/team_year_stat.rb
Overview
Represents a team’s year-by-year statistics
Instance Attribute Summary collapse
-
#ast ⇒ Float
Returns assists per game.
-
#blk ⇒ Float
Returns blocks per game.
-
#conf_rank ⇒ Integer
Returns conference rank.
-
#div_rank ⇒ Integer
Returns division rank.
-
#dreb ⇒ Float
Returns defensive rebounds per game.
-
#fg3_pct ⇒ Float
Returns three-point percentage.
-
#fg3a ⇒ Float
Returns three-pointers attempted per game.
-
#fg3m ⇒ Float
Returns three-pointers made per game.
-
#fg_pct ⇒ Float
Returns field goal percentage.
-
#fga ⇒ Float
Returns field goals attempted per game.
-
#fgm ⇒ Float
Returns field goals made per game.
-
#ft_pct ⇒ Float
Returns free throw percentage.
-
#fta ⇒ Float
Returns free throws attempted per game.
-
#ftm ⇒ Float
Returns free throws made per game.
-
#gp ⇒ Integer
Returns games played.
-
#losses ⇒ Integer
Returns losses.
-
#nba_finals_appearance ⇒ String
Returns NBA Finals appearance.
-
#oreb ⇒ Float
Returns offensive rebounds per game.
-
#pf ⇒ Float
Returns personal fouls per game.
-
#po_losses ⇒ Integer
Returns playoff losses.
-
#po_wins ⇒ Integer
Returns playoff wins.
-
#pts ⇒ Float
Returns points per game.
-
#pts_rank ⇒ Integer
Returns points rank.
-
#reb ⇒ Float
Returns total rebounds per game.
-
#stl ⇒ Float
Returns steals per game.
-
#team_city ⇒ String
Returns the team city.
-
#team_id ⇒ Integer
Returns the team ID.
-
#team_name ⇒ String
Returns the team name.
-
#tov ⇒ Float
Returns turnovers per game.
-
#win_pct ⇒ Float
Returns win percentage.
-
#wins ⇒ Integer
Returns wins.
-
#year ⇒ String
Returns the year.
Instance Method Summary collapse
-
#full_name ⇒ String
Returns the full team name.
-
#team ⇒ Team?
Returns the team object.
Instance Attribute Details
#ast ⇒ Float
Returns assists per game
212 |
# File 'lib/nba/team_year_stat.rb', line 212 attribute :ast, Shale::Type::Float |
#blk ⇒ Float
Returns blocks per game
244 |
# File 'lib/nba/team_year_stat.rb', line 244 attribute :blk, Shale::Type::Float |
#conf_rank ⇒ Integer
Returns conference rank
76 |
# File 'lib/nba/team_year_stat.rb', line 76 attribute :conf_rank, Shale::Type::Integer |
#div_rank ⇒ Integer
Returns division rank
84 |
# File 'lib/nba/team_year_stat.rb', line 84 attribute :div_rank, Shale::Type::Integer |
#dreb ⇒ Float
Returns defensive rebounds per game
196 |
# File 'lib/nba/team_year_stat.rb', line 196 attribute :dreb, Shale::Type::Float |
#fg3_pct ⇒ Float
Returns three-point percentage
156 |
# File 'lib/nba/team_year_stat.rb', line 156 attribute :fg3_pct, Shale::Type::Float |
#fg3a ⇒ Float
Returns three-pointers attempted per game
148 |
# File 'lib/nba/team_year_stat.rb', line 148 attribute :fg3a, Shale::Type::Float |
#fg3m ⇒ Float
Returns three-pointers made per game
140 |
# File 'lib/nba/team_year_stat.rb', line 140 attribute :fg3m, Shale::Type::Float |
#fg_pct ⇒ Float
Returns field goal percentage
132 |
# File 'lib/nba/team_year_stat.rb', line 132 attribute :fg_pct, Shale::Type::Float |
#fga ⇒ Float
Returns field goals attempted per game
124 |
# File 'lib/nba/team_year_stat.rb', line 124 attribute :fga, Shale::Type::Float |
#fgm ⇒ Float
Returns field goals made per game
116 |
# File 'lib/nba/team_year_stat.rb', line 116 attribute :fgm, Shale::Type::Float |
#ft_pct ⇒ Float
Returns free throw percentage
180 |
# File 'lib/nba/team_year_stat.rb', line 180 attribute :ft_pct, Shale::Type::Float |
#fta ⇒ Float
Returns free throws attempted per game
172 |
# File 'lib/nba/team_year_stat.rb', line 172 attribute :fta, Shale::Type::Float |
#ftm ⇒ Float
Returns free throws made per game
164 |
# File 'lib/nba/team_year_stat.rb', line 164 attribute :ftm, Shale::Type::Float |
#gp ⇒ Integer
Returns games played
44 |
# File 'lib/nba/team_year_stat.rb', line 44 attribute :gp, Shale::Type::Integer |
#losses ⇒ Integer
Returns losses
60 |
# File 'lib/nba/team_year_stat.rb', line 60 attribute :losses, Shale::Type::Integer |
#nba_finals_appearance ⇒ String
Returns NBA Finals appearance
108 |
# File 'lib/nba/team_year_stat.rb', line 108 attribute :nba_finals_appearance, Shale::Type::String |
#oreb ⇒ Float
Returns offensive rebounds per game
188 |
# File 'lib/nba/team_year_stat.rb', line 188 attribute :oreb, Shale::Type::Float |
#pf ⇒ Float
Returns personal fouls per game
220 |
# File 'lib/nba/team_year_stat.rb', line 220 attribute :pf, Shale::Type::Float |
#po_losses ⇒ Integer
Returns playoff losses
100 |
# File 'lib/nba/team_year_stat.rb', line 100 attribute :po_losses, Shale::Type::Integer |
#po_wins ⇒ Integer
Returns playoff wins
92 |
# File 'lib/nba/team_year_stat.rb', line 92 attribute :po_wins, Shale::Type::Integer |
#pts ⇒ Float
Returns points per game
252 |
# File 'lib/nba/team_year_stat.rb', line 252 attribute :pts, Shale::Type::Float |
#pts_rank ⇒ Integer
Returns points rank
260 |
# File 'lib/nba/team_year_stat.rb', line 260 attribute :pts_rank, Shale::Type::Integer |
#reb ⇒ Float
Returns total rebounds per game
204 |
# File 'lib/nba/team_year_stat.rb', line 204 attribute :reb, Shale::Type::Float |
#stl ⇒ Float
Returns steals per game
228 |
# File 'lib/nba/team_year_stat.rb', line 228 attribute :stl, Shale::Type::Float |
#team_city ⇒ String
Returns the team city
20 |
# File 'lib/nba/team_year_stat.rb', line 20 attribute :team_city, Shale::Type::String |
#team_id ⇒ Integer
Returns the team ID
12 |
# File 'lib/nba/team_year_stat.rb', line 12 attribute :team_id, Shale::Type::Integer |
#team_name ⇒ String
Returns the team name
28 |
# File 'lib/nba/team_year_stat.rb', line 28 attribute :team_name, Shale::Type::String |
#tov ⇒ Float
Returns turnovers per game
236 |
# File 'lib/nba/team_year_stat.rb', line 236 attribute :tov, Shale::Type::Float |
#win_pct ⇒ Float
Returns win percentage
68 |
# File 'lib/nba/team_year_stat.rb', line 68 attribute :win_pct, Shale::Type::Float |
#wins ⇒ Integer
Returns wins
52 |
# File 'lib/nba/team_year_stat.rb', line 52 attribute :wins, Shale::Type::Integer |
#year ⇒ String
Returns the year
36 |
# File 'lib/nba/team_year_stat.rb', line 36 attribute :year, Shale::Type::String |
Instance Method Details
#full_name ⇒ String
Returns the full team name
278 279 280 |
# File 'lib/nba/team_year_stat.rb', line 278 def full_name "#{team_city} #{team_name}".strip end |
#team ⇒ Team?
Returns the team object
268 269 270 |
# File 'lib/nba/team_year_stat.rb', line 268 def team Teams.find(team_id) end |