Class: NBA::TeamDashboardStat

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

Overview

Represents team dashboard split statistics

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#astFloat

Returns assists per game

Examples:

stat.ast #=> 27.5


172
# File 'lib/nba/team_dashboard_stat.rb', line 172

attribute :ast, Shale::Type::Float

#blkFloat

Returns blocks per game

Examples:

stat.blk #=> 4.8


196
# File 'lib/nba/team_dashboard_stat.rb', line 196

attribute :blk, Shale::Type::Float

#blkaFloat

Returns blocked attempts per game

Examples:

stat.blka #=> 4.2


204
# File 'lib/nba/team_dashboard_stat.rb', line 204

attribute :blka, Shale::Type::Float

#drebFloat

Returns defensive rebounds per game

Examples:

stat.dreb #=> 34.8


156
# File 'lib/nba/team_dashboard_stat.rb', line 156

attribute :dreb, Shale::Type::Float

#fg3_pctFloat

Returns three-point percentage

Examples:

stat.fg3_pct #=> 0.368


116
# File 'lib/nba/team_dashboard_stat.rb', line 116

attribute :fg3_pct, Shale::Type::Float

#fg3aFloat

Returns three-pointers attempted per game

Examples:

stat.fg3a #=> 40.2


108
# File 'lib/nba/team_dashboard_stat.rb', line 108

attribute :fg3a, Shale::Type::Float

#fg3mFloat

Returns three-pointers made per game

Examples:

stat.fg3m #=> 14.8


100
# File 'lib/nba/team_dashboard_stat.rb', line 100

attribute :fg3m, Shale::Type::Float

#fg_pctFloat

Returns field goal percentage

Examples:

stat.fg_pct #=> 0.451


92
# File 'lib/nba/team_dashboard_stat.rb', line 92

attribute :fg_pct, Shale::Type::Float

#fgaFloat

Returns field goals attempted per game

Examples:

stat.fga #=> 87.8


84
# File 'lib/nba/team_dashboard_stat.rb', line 84

attribute :fga, Shale::Type::Float

#fgmFloat

Returns field goals made per game

Examples:

stat.fgm #=> 39.6


76
# File 'lib/nba/team_dashboard_stat.rb', line 76

attribute :fgm, Shale::Type::Float

#ft_pctFloat

Returns free throw percentage

Examples:

stat.ft_pct #=> 0.805


140
# File 'lib/nba/team_dashboard_stat.rb', line 140

attribute :ft_pct, Shale::Type::Float

#ftaFloat

Returns free throws attempted per game

Examples:

stat.fta #=> 22.1


132
# File 'lib/nba/team_dashboard_stat.rb', line 132

attribute :fta, Shale::Type::Float

#ftmFloat

Returns free throws made per game

Examples:

stat.ftm #=> 17.8


124
# File 'lib/nba/team_dashboard_stat.rb', line 124

attribute :ftm, Shale::Type::Float

#gpInteger

Returns games played

Examples:

stat.gp #=> 82


36
# File 'lib/nba/team_dashboard_stat.rb', line 36

attribute :gp, Shale::Type::Integer

#group_setString

Returns the group set name

Examples:

stat.group_set #=> "Overall"


12
# File 'lib/nba/team_dashboard_stat.rb', line 12

attribute :group_set, Shale::Type::String

#group_valueString

Returns the group value

Examples:

stat.group_value #=> "2023-24"


20
# File 'lib/nba/team_dashboard_stat.rb', line 20

attribute :group_value, Shale::Type::String

#lInteger

Returns losses

Examples:

stat.l #=> 36


52
# File 'lib/nba/team_dashboard_stat.rb', line 52

attribute :l, Shale::Type::Integer

#minFloat

Returns minutes per game

Examples:

stat.min #=> 240.0


68
# File 'lib/nba/team_dashboard_stat.rb', line 68

attribute :min, Shale::Type::Float

#orebFloat

Returns offensive rebounds per game

Examples:

stat.oreb #=> 9.1


148
# File 'lib/nba/team_dashboard_stat.rb', line 148

attribute :oreb, Shale::Type::Float

#pfFloat

Returns personal fouls per game

Examples:

stat.pf #=> 20.1


212
# File 'lib/nba/team_dashboard_stat.rb', line 212

attribute :pf, Shale::Type::Float

#pfdFloat

Returns personal fouls drawn per game

Examples:

stat.pfd #=> 18.9


220
# File 'lib/nba/team_dashboard_stat.rb', line 220

attribute :pfd, Shale::Type::Float

#plus_minusFloat

Returns plus/minus per game

Examples:

stat.plus_minus #=> 2.5


236
# File 'lib/nba/team_dashboard_stat.rb', line 236

attribute :plus_minus, Shale::Type::Float

#ptsFloat

Returns points per game

Examples:

stat.pts #=> 111.8


228
# File 'lib/nba/team_dashboard_stat.rb', line 228

attribute :pts, Shale::Type::Float

#rebFloat

Returns total rebounds per game

Examples:

stat.reb #=> 43.9


164
# File 'lib/nba/team_dashboard_stat.rb', line 164

attribute :reb, Shale::Type::Float

#stlFloat

Returns steals per game

Examples:

stat.stl #=> 7.6


188
# File 'lib/nba/team_dashboard_stat.rb', line 188

attribute :stl, Shale::Type::Float

#team_idInteger

Returns the team ID

Examples:

stat.team_id #=> 1610612744


28
# File 'lib/nba/team_dashboard_stat.rb', line 28

attribute :team_id, Shale::Type::Integer

#tovFloat

Returns turnovers per game

Examples:

stat.tov #=> 14.1


180
# File 'lib/nba/team_dashboard_stat.rb', line 180

attribute :tov, Shale::Type::Float

#wInteger

Returns wins

Examples:

stat.w #=> 46


44
# File 'lib/nba/team_dashboard_stat.rb', line 44

attribute :w, Shale::Type::Integer

#w_pctFloat

Returns win percentage

Examples:

stat.w_pct #=> 0.561


60
# File 'lib/nba/team_dashboard_stat.rb', line 60

attribute :w_pct, Shale::Type::Float

Instance Method Details

#teamTeam?

Returns the team object

Examples:

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


244
245
246
# File 'lib/nba/team_dashboard_stat.rb', line 244

def team
  Teams.find(team_id)
end