Class: NBA::LeagueDashTeamStat

Inherits:
Shale::Mapper
  • Object
show all
Defined in:
lib/nba/league_dash_team_stat.rb

Overview

Represents league-wide team statistics

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#astFloat

Returns assists per game

Examples:

stat.ast #=> 27.8


175
# File 'lib/nba/league_dash_team_stat.rb', line 175

attribute :ast, Shale::Type::Float

#blkFloat

Returns blocks per game

Examples:

stat.blk #=> 5.2


199
# File 'lib/nba/league_dash_team_stat.rb', line 199

attribute :blk, Shale::Type::Float

#blkaFloat

Returns blocked attempts per game

Examples:

stat.blka #=> 4.8


207
# File 'lib/nba/league_dash_team_stat.rb', line 207

attribute :blka, Shale::Type::Float

#drebFloat

Returns defensive rebounds per game

Examples:

stat.dreb #=> 34.5


159
# File 'lib/nba/league_dash_team_stat.rb', line 159

attribute :dreb, Shale::Type::Float

#fg3_pctFloat

Returns three point percentage

Examples:

stat.fg3_pct #=> 0.359


119
# File 'lib/nba/league_dash_team_stat.rb', line 119

attribute :fg3_pct, Shale::Type::Float

#fg3aFloat

Returns three pointers attempted per game

Examples:

stat.fg3a #=> 38.2


111
# File 'lib/nba/league_dash_team_stat.rb', line 111

attribute :fg3a, Shale::Type::Float

#fg3mFloat

Returns three pointers made per game

Examples:

stat.fg3m #=> 13.7


103
# File 'lib/nba/league_dash_team_stat.rb', line 103

attribute :fg3m, Shale::Type::Float

#fg_pctFloat

Returns field goal percentage

Examples:

stat.fg_pct #=> 0.467


95
# File 'lib/nba/league_dash_team_stat.rb', line 95

attribute :fg_pct, Shale::Type::Float

#fgaFloat

Returns field goals attempted per game

Examples:

stat.fga #=> 90.5


87
# File 'lib/nba/league_dash_team_stat.rb', line 87

attribute :fga, Shale::Type::Float

#fgmFloat

Returns field goals made per game

Examples:

stat.fgm #=> 42.3


79
# File 'lib/nba/league_dash_team_stat.rb', line 79

attribute :fgm, Shale::Type::Float

#ft_pctFloat

Returns free throw percentage

Examples:

stat.ft_pct #=> 0.785


143
# File 'lib/nba/league_dash_team_stat.rb', line 143

attribute :ft_pct, Shale::Type::Float

#ftaFloat

Returns free throws attempted per game

Examples:

stat.fta #=> 22.3


135
# File 'lib/nba/league_dash_team_stat.rb', line 135

attribute :fta, Shale::Type::Float

#ftmFloat

Returns free throws made per game

Examples:

stat.ftm #=> 17.5


127
# File 'lib/nba/league_dash_team_stat.rb', line 127

attribute :ftm, Shale::Type::Float

#gpInteger

Returns games played

Examples:

stat.gp #=> 82


39
# File 'lib/nba/league_dash_team_stat.rb', line 39

attribute :gp, Shale::Type::Integer

#gp_rankInteger

Returns games played rank

Examples:

stat.gp_rank #=> 1


247
# File 'lib/nba/league_dash_team_stat.rb', line 247

attribute :gp_rank, Shale::Type::Integer

#lInteger

Returns losses

Examples:

stat.l #=> 29


55
# File 'lib/nba/league_dash_team_stat.rb', line 55

attribute :l, Shale::Type::Integer

#minFloat

Returns minutes per game

Examples:

stat.min #=> 240.0


71
# File 'lib/nba/league_dash_team_stat.rb', line 71

attribute :min, Shale::Type::Float

#orebFloat

Returns offensive rebounds per game

Examples:

stat.oreb #=> 10.2


151
# File 'lib/nba/league_dash_team_stat.rb', line 151

attribute :oreb, Shale::Type::Float

#pfFloat

Returns personal fouls per game

Examples:

stat.pf #=> 18.5


215
# File 'lib/nba/league_dash_team_stat.rb', line 215

attribute :pf, Shale::Type::Float

#pfdFloat

Returns personal fouls drawn per game

Examples:

stat.pfd #=> 19.2


223
# File 'lib/nba/league_dash_team_stat.rb', line 223

attribute :pfd, Shale::Type::Float

#plus_minusFloat

Returns plus/minus per game

Examples:

stat.plus_minus #=> 5.2


239
# File 'lib/nba/league_dash_team_stat.rb', line 239

attribute :plus_minus, Shale::Type::Float

#ptsFloat

Returns points per game

Examples:

stat.pts #=> 115.8


231
# File 'lib/nba/league_dash_team_stat.rb', line 231

attribute :pts, Shale::Type::Float

#pts_rankInteger

Returns points rank

Examples:

stat.pts_rank #=> 5


263
# File 'lib/nba/league_dash_team_stat.rb', line 263

attribute :pts_rank, Shale::Type::Integer

#rebFloat

Returns total rebounds per game

Examples:

stat.reb #=> 44.7


167
# File 'lib/nba/league_dash_team_stat.rb', line 167

attribute :reb, Shale::Type::Float

#season_idString

Returns the season ID

Examples:

stat.season_id #=> "2024-25"


31
# File 'lib/nba/league_dash_team_stat.rb', line 31

attribute :season_id, Shale::Type::String

#stlFloat

Returns steals per game

Examples:

stat.stl #=> 7.5


191
# File 'lib/nba/league_dash_team_stat.rb', line 191

attribute :stl, Shale::Type::Float

#team_idInteger

Returns the team ID

Examples:

stat.team_id #=> 1610612744


15
# File 'lib/nba/league_dash_team_stat.rb', line 15

attribute :team_id, Shale::Type::Integer

#team_nameString

Returns the team name

Examples:

stat.team_name #=> "Golden State Warriors"


23
# File 'lib/nba/league_dash_team_stat.rb', line 23

attribute :team_name, Shale::Type::String

#tovFloat

Returns turnovers per game

Examples:

stat.tov #=> 13.2


183
# File 'lib/nba/league_dash_team_stat.rb', line 183

attribute :tov, Shale::Type::Float

#wInteger

Returns wins

Examples:

stat.w #=> 53


47
# File 'lib/nba/league_dash_team_stat.rb', line 47

attribute :w, Shale::Type::Integer

#w_pctFloat

Returns win percentage

Examples:

stat.w_pct #=> 0.646


63
# File 'lib/nba/league_dash_team_stat.rb', line 63

attribute :w_pct, Shale::Type::Float

#w_rankInteger

Returns wins rank

Examples:

stat.w_rank #=> 3


255
# File 'lib/nba/league_dash_team_stat.rb', line 255

attribute :w_rank, Shale::Type::Integer

Instance Method Details

#teamTeam?

Returns the team object

Examples:

stat.team #=> #<NBA::Team>


271
272
273
# File 'lib/nba/league_dash_team_stat.rb', line 271

def team
  Teams.find(team_id)
end