Class: NBA::BoxScoreAdvancedTeamStat

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

Overview

Represents a team’s advanced box score statistics for a game

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ast_pctFloat

Returns assist percentage

Examples:

stat.ast_pct #=> 66.7

Returns:

  • (Float)

    the assist percentage



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

attribute :ast_pct, Shale::Type::Float

#ast_ratioFloat

Returns assist ratio

Examples:

stat.ast_ratio #=> 19.8

Returns:

  • (Float)

    the assist ratio



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

attribute :ast_ratio, Shale::Type::Float

#ast_tovFloat

Returns assist to turnover ratio

Examples:

stat.ast_tov #=> 2.0

Returns:

  • (Float)

    the assist to turnover ratio



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

attribute :ast_tov, Shale::Type::Float

#def_ratingFloat

Returns defensive rating

Examples:

stat.def_rating #=> 108.9

Returns:

  • (Float)

    the defensive rating



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

attribute :def_rating, Shale::Type::Float

#dreb_pctFloat

Returns defensive rebound percentage

Examples:

stat.dreb_pct #=> 77.8

Returns:

  • (Float)

    the defensive rebound percentage



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

attribute :dreb_pct, Shale::Type::Float

#e_def_ratingFloat

Returns estimated defensive rating

Examples:

stat.e_def_rating #=> 110.3

Returns:

  • (Float)

    the estimated defensive rating



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

attribute :e_def_rating, Shale::Type::Float

#e_net_ratingFloat

Returns estimated net rating

Examples:

stat.e_net_rating #=> 4.9

Returns:

  • (Float)

    the estimated net rating



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

attribute :e_net_rating, Shale::Type::Float

#e_off_ratingFloat

Returns estimated offensive rating

Examples:

stat.e_off_rating #=> 115.2

Returns:

  • (Float)

    the estimated offensive rating



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

attribute :e_off_rating, Shale::Type::Float

#e_paceFloat

Returns estimated pace

Examples:

stat.e_pace #=> 99.5

Returns:

  • (Float)

    the estimated pace



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

attribute :e_pace, Shale::Type::Float

#efg_pctFloat

Returns effective field goal percentage

Examples:

stat.efg_pct #=> 0.562

Returns:

  • (Float)

    the effective field goal percentage



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

attribute :efg_pct, Shale::Type::Float

#game_idString

Returns the game ID

Examples:

stat.game_id #=> "0022400350"

Returns:

  • (String)

    the game ID



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

attribute :game_id, Shale::Type::String

#minString

Returns total minutes played

Examples:

stat.min #=> "240:00"

Returns:

  • (String)

    the minutes



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

attribute :min, Shale::Type::String

#net_ratingFloat

Returns net rating

Examples:

stat.net_rating #=> 8.6

Returns:

  • (Float)

    the net rating



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

attribute :net_rating, Shale::Type::Float

#off_ratingFloat

Returns offensive rating

Examples:

stat.off_rating #=> 117.5

Returns:

  • (Float)

    the offensive rating



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

attribute :off_rating, Shale::Type::Float

#oreb_pctFloat

Returns offensive rebound percentage

Examples:

stat.oreb_pct #=> 22.2

Returns:

  • (Float)

    the offensive rebound percentage



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

attribute :oreb_pct, Shale::Type::Float

#paceFloat

Returns pace

Examples:

stat.pace #=> 101.2

Returns:

  • (Float)

    the pace



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

attribute :pace, Shale::Type::Float

#pace_per40Float

Returns pace per 40 minutes

Examples:

stat.pace_per40 #=> 100.8

Returns:

  • (Float)

    the pace per 40 minutes



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

attribute :pace_per40, Shale::Type::Float

#pieFloat

Returns player impact estimate

Examples:

stat.pie #=> 52.3

Returns:

  • (Float)

    the player impact estimate



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

attribute :pie, Shale::Type::Float

#possInteger

Returns possessions

Examples:

stat.poss #=> 98

Returns:

  • (Integer)

    the possessions



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

attribute :poss, Shale::Type::Integer

#reb_pctFloat

Returns total rebound percentage

Examples:

stat.reb_pct #=> 50.0

Returns:

  • (Float)

    the total rebound percentage



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

attribute :reb_pct, Shale::Type::Float

#team_abbreviationString

Returns the team abbreviation

Examples:

stat.team_abbreviation #=> "GSW"

Returns:

  • (String)

    the team abbreviation



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

attribute :team_abbreviation, Shale::Type::String

#team_cityString

Returns the team city

Examples:

stat.team_city #=> "Golden State"

Returns:

  • (String)

    the team city



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

attribute :team_city, Shale::Type::String

#team_idInteger

Returns the team ID

Examples:

stat.team_id #=> 1610612744

Returns:

  • (Integer)

    the team ID



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

attribute :team_id, Shale::Type::Integer

#team_nameString

Returns the team name

Examples:

stat.team_name #=> "Warriors"

Returns:

  • (String)

    the team name



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

attribute :team_name, Shale::Type::String

#tov_pctFloat

Returns turnover percentage

Examples:

stat.tov_pct #=> 14.5

Returns:

  • (Float)

    the turnover percentage



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

attribute :tov_pct, Shale::Type::Float

#ts_pctFloat

Returns true shooting percentage

Examples:

stat.ts_pct #=> 0.590

Returns:

  • (Float)

    the true shooting percentage



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

attribute :ts_pct, Shale::Type::Float

Instance Method Details

#gameGame?

Returns the game object for this box score

Examples:

stat.game #=> #<NBA::Game>

Returns:

  • (Game, nil)

    the game object



233
234
235
# File 'lib/nba/box_score_advanced_team_stat.rb', line 233

def game
  Games.find(game_id)
end

#teamTeam?

Returns the team object

Examples:

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

Returns:

  • (Team, nil)

    the team object



223
224
225
# File 'lib/nba/box_score_advanced_team_stat.rb', line 223

def team
  Teams.find(team_id)
end