Class: NBA::CareerStats

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

Overview

Represents career statistics for a player (season averages)

Instance Attribute Summary collapse

Instance Attribute Details

#astFloat

Returns assists per game

Examples:

stats.ast #=> 5.1

Returns:

  • (Float)

    assists per game



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

attribute :ast, Shale::Type::Float

#blkFloat

Returns blocks per game

Examples:

stats.blk #=> 0.4

Returns:

  • (Float)

    blocks per game



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

attribute :blk, Shale::Type::Float

#drebFloat

Returns defensive rebounds per game

Examples:

stats.dreb #=> 4.0

Returns:

  • (Float)

    defensive rebounds per game



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

attribute :dreb, Shale::Type::Float

#fg3_pctFloat

Returns three-point percentage

Examples:

stats.fg3_pct #=> 0.408

Returns:

  • (Float)

    three-point percentage



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

attribute :fg3_pct, Shale::Type::Float

#fg3aFloat

Returns three-pointers attempted per game

Examples:

stats.fg3a #=> 11.7

Returns:

  • (Float)

    three-pointers attempted per game



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

attribute :fg3a, Shale::Type::Float

#fg3mFloat

Returns three-pointers made per game

Examples:

stats.fg3m #=> 4.8

Returns:

  • (Float)

    three-pointers made per game



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

attribute :fg3m, Shale::Type::Float

#fg_pctFloat

Returns field goal percentage

Examples:

stats.fg_pct #=> 0.473

Returns:

  • (Float)

    field goal percentage



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

attribute :fg_pct, Shale::Type::Float

#fgaFloat

Returns field goals attempted per game

Examples:

stats.fga #=> 17.9

Returns:

  • (Float)

    field goals attempted per game



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

attribute :fga, Shale::Type::Float

#fgmFloat

Returns field goals made per game

Examples:

stats.fgm #=> 8.4

Returns:

  • (Float)

    field goals made per game



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

attribute :fgm, Shale::Type::Float

#ft_pctFloat

Returns free throw percentage

Examples:

stats.ft_pct #=> 0.915

Returns:

  • (Float)

    free throw percentage



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

attribute :ft_pct, Shale::Type::Float

#ftaFloat

Returns free throws attempted per game

Examples:

stats.fta #=> 4.9

Returns:

  • (Float)

    free throws attempted per game



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

attribute :fta, Shale::Type::Float

#ftmFloat

Returns free throws made per game

Examples:

stats.ftm #=> 4.5

Returns:

  • (Float)

    free throws made per game



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

attribute :ftm, Shale::Type::Float

#gpInteger

Returns games played

Examples:

stats.gp #=> 74

Returns:

  • (Integer)

    games played



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

attribute :gp, Shale::Type::Integer

#gsInteger

Returns games started

Examples:

stats.gs #=> 74

Returns:

  • (Integer)

    games started



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

attribute :gs, Shale::Type::Integer

#minFloat

Returns minutes per game

Examples:

stats.min #=> 32.7

Returns:

  • (Float)

    minutes per game



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

attribute :min, Shale::Type::Float

#orebFloat

Returns offensive rebounds per game

Examples:

stats.oreb #=> 0.5

Returns:

  • (Float)

    offensive rebounds per game



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

attribute :oreb, Shale::Type::Float

#pfFloat

Returns personal fouls per game

Examples:

stats.pf #=> 1.8

Returns:

  • (Float)

    personal fouls per game



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

attribute :pf, Shale::Type::Float

#player_ageInteger

Returns the player’s age during the season

Examples:

stats.player_age #=> 36

Returns:

  • (Integer)

    the player’s age



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

attribute :player_age, Shale::Type::Integer

#player_idInteger

Returns the player ID

Examples:

stats.player_id #=> 201939

Returns:

  • (Integer)

    the player ID



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

attribute :player_id, Shale::Type::Integer

#ptsFloat

Returns points per game

Examples:

stats.pts #=> 26.4

Returns:

  • (Float)

    points per game



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

attribute :pts, Shale::Type::Float

#rebFloat

Returns total rebounds per game

Examples:

stats.reb #=> 4.5

Returns:

  • (Float)

    total rebounds per game



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

attribute :reb, Shale::Type::Float

#season_idString

Returns the season ID

Examples:

stats.season_id #=> "2024-25"

Returns:

  • (String)

    the season ID



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

attribute :season_id, Shale::Type::String

#stlFloat

Returns steals per game

Examples:

stats.stl #=> 0.7

Returns:

  • (Float)

    steals per game



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

attribute :stl, Shale::Type::Float

#team_abbreviationString

Returns the team abbreviation

Examples:

stats.team_abbreviation #=> "GSW"

Returns:

  • (String)

    the team abbreviation



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

attribute :team_abbreviation, Shale::Type::String

#team_idInteger

Returns the team ID

Examples:

stats.team_id #=> 1610612744

Returns:

  • (Integer)

    the team ID



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

attribute :team_id, Shale::Type::Integer

#tovFloat

Returns turnovers per game

Examples:

stats.tov #=> 3.0

Returns:

  • (Float)

    turnovers per game



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

attribute :tov, Shale::Type::Float