Class: NBA::BoxScorePlayerTrackTeamStat

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

Overview

Represents player tracking statistics for a team in a game

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#astInteger

Returns assists

Examples:

stat.ast #=> 28

Returns:

  • (Integer)

    assists



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

attribute :ast, Shale::Type::Integer

#cfg_pctFloat

Returns contested field goal percentage

Examples:

stat.cfg_pct #=> 0.400

Returns:

  • (Float)

    contested field goal percentage



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

attribute :cfg_pct, Shale::Type::Float

#cfgaInteger

Returns contested field goals attempted

Examples:

stat.cfga #=> 45

Returns:

  • (Integer)

    contested field goals attempted



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

attribute :cfga, Shale::Type::Integer

#cfgmInteger

Returns contested field goals made

Examples:

stat.cfgm #=> 18

Returns:

  • (Integer)

    contested field goals made



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

attribute :cfgm, Shale::Type::Integer

#dfg_pctFloat

Returns defended field goal percentage

Examples:

stat.dfg_pct #=> 0.455

Returns:

  • (Float)

    defended field goal percentage



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

attribute :dfg_pct, Shale::Type::Float

#dfgaInteger

Returns defended field goals attempted

Examples:

stat.dfga #=> 55

Returns:

  • (Integer)

    defended field goals attempted



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

attribute :dfga, Shale::Type::Integer

#dfgmInteger

Returns defended field goals made

Examples:

stat.dfgm #=> 25

Returns:

  • (Integer)

    defended field goals made



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

attribute :dfgm, Shale::Type::Integer

#distanceFloat

Returns total team distance traveled in miles

Examples:

stat.distance #=> 24.5

Returns:

  • (Float)

    distance traveled



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

attribute :distance, Shale::Type::Float

#dreb_chancesInteger

Returns defensive rebound chances

Examples:

stat.dreb_chances #=> 45

Returns:

  • (Integer)

    defensive rebound chances



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

attribute :dreb_chances, Shale::Type::Integer

#ft_astInteger

Returns free throw assists

Examples:

stat.ft_ast #=> 5

Returns:

  • (Integer)

    free throw assists



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

attribute :ft_ast, Shale::Type::Integer

#game_idString

Returns the game ID

Examples:

stat.game_id #=> "0022400001"

Returns:

  • (String)

    the game ID



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

attribute :game_id, Shale::Type::String

#minString

Returns minutes played

Examples:

stat.min #=> "240:00"

Returns:

  • (String)

    the minutes



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

attribute :min, Shale::Type::String

#oreb_chancesInteger

Returns offensive rebound chances

Examples:

stat.oreb_chances #=> 35

Returns:

  • (Integer)

    offensive rebound chances



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

attribute :oreb_chances, Shale::Type::Integer

#passesInteger

Returns total passes

Examples:

stat.passes #=> 285

Returns:

  • (Integer)

    total passes



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

attribute :passes, Shale::Type::Integer

#reb_chancesInteger

Returns total rebound chances

Examples:

stat.reb_chances #=> 80

Returns:

  • (Integer)

    total rebound chances



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

attribute :reb_chances, Shale::Type::Integer

#secondary_astInteger

Returns secondary assists

Examples:

stat.secondary_ast #=> 12

Returns:

  • (Integer)

    secondary assists



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

attribute :secondary_ast, Shale::Type::Integer

#speedFloat

Returns team average speed in miles per hour

Examples:

stat.speed #=> 4.38

Returns:

  • (Float)

    average speed



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

attribute :speed, 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_player_track_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_player_track_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_player_track_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_player_track_team_stat.rb', line 31

attribute :team_name, Shale::Type::String

#touchesInteger

Returns total touches

Examples:

stat.touches #=> 350

Returns:

  • (Integer)

    total touches



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

attribute :touches, Shale::Type::Integer

#ufg_pctFloat

Returns uncontested field goal percentage

Examples:

stat.ufg_pct #=> 0.686

Returns:

  • (Float)

    uncontested field goal percentage



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

attribute :ufg_pct, Shale::Type::Float

#ufgaInteger

Returns uncontested field goals attempted

Examples:

stat.ufga #=> 35

Returns:

  • (Integer)

    uncontested field goals attempted



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

attribute :ufga, Shale::Type::Integer

#ufgmInteger

Returns uncontested field goals made

Examples:

stat.ufgm #=> 24

Returns:

  • (Integer)

    uncontested field goals made



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

attribute :ufgm, Shale::Type::Integer

Instance Method Details

#gameGame?

Returns the game object

Examples:

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

Returns:

  • (Game, nil)

    the game object



225
226
227
# File 'lib/nba/box_score_player_track_team_stat.rb', line 225

def game
  Games.find(game_id)
end

#teamTeam?

Returns the team object

Examples:

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

Returns:

  • (Team, nil)

    the team object



215
216
217
# File 'lib/nba/box_score_player_track_team_stat.rb', line 215

def team
  Teams.find(team_id)
end