Class: NBA::CumeStatsTeamTotal

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

Overview

Represents total cumulative team statistics

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#astInteger

Returns assists

Examples:

total.ast #=> 250

Returns:

  • (Integer)

    assists



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

attribute :ast, Shale::Type::Integer

#blkInteger

Returns blocks

Examples:

total.blk #=> 45

Returns:

  • (Integer)

    blocks



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

attribute :blk, Shale::Type::Integer

#cityString

Returns the city name

Examples:

total.city #=> "Golden State"

Returns:

  • (String)

    the city name



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

attribute :city, Shale::Type::String

#drebInteger

Returns defensive rebounds

Examples:

total.dreb #=> 350

Returns:

  • (Integer)

    defensive rebounds



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

attribute :dreb, Shale::Type::Integer

#fg3_pctFloat

Returns three point field goal percentage

Examples:

total.fg3_pct #=> 0.375

Returns:

  • (Float)

    three point field goal percentage



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

attribute :fg3_pct, Shale::Type::Float

#fg3aInteger

Returns three point field goals attempted

Examples:

total.fg3a #=> 400

Returns:

  • (Integer)

    three point field goals attempted



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

attribute :fg3a, Shale::Type::Integer

#fg3mInteger

Returns three point field goals made

Examples:

total.fg3m #=> 150

Returns:

  • (Integer)

    three point field goals made



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

attribute :fg3m, Shale::Type::Integer

#fg_pctFloat

Returns field goal percentage

Examples:

total.fg_pct #=> 0.471

Returns:

  • (Float)

    field goal percentage



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

attribute :fg_pct, Shale::Type::Float

#fgaInteger

Returns field goals attempted

Examples:

total.fga #=> 850

Returns:

  • (Integer)

    field goals attempted



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

attribute :fga, Shale::Type::Integer

#fgmInteger

Returns field goals made

Examples:

total.fgm #=> 400

Returns:

  • (Integer)

    field goals made



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

attribute :fgm, Shale::Type::Integer

#ft_pctFloat

Returns free throw percentage

Examples:

total.ft_pct #=> 0.818

Returns:

  • (Float)

    free throw percentage



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

attribute :ft_pct, Shale::Type::Float

#ftaInteger

Returns free throws attempted

Examples:

total.fta #=> 220

Returns:

  • (Integer)

    free throws attempted



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

attribute :fta, Shale::Type::Integer

#ftmInteger

Returns free throws made

Examples:

total.ftm #=> 180

Returns:

  • (Integer)

    free throws made



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

attribute :ftm, Shale::Type::Integer

#gpInteger

Returns games played

Examples:

total.gp #=> 10

Returns:

  • (Integer)

    games played



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

attribute :gp, Shale::Type::Integer

#gsInteger

Returns games started

Examples:

total.gs #=> 10

Returns:

  • (Integer)

    games started



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

attribute :gs, Shale::Type::Integer

#lInteger

Returns losses

Examples:

total.l #=> 2

Returns:

  • (Integer)

    losses



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

attribute :l, Shale::Type::Integer

#l_homeInteger

Returns home losses

Examples:

total.l_home #=> 1

Returns:

  • (Integer)

    home losses



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

attribute :l_home, Shale::Type::Integer

#l_roadInteger

Returns road losses

Examples:

total.l_road #=> 1

Returns:

  • (Integer)

    road losses



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

attribute :l_road, Shale::Type::Integer

#nicknameString

Returns the team nickname

Examples:

total.nickname #=> "Warriors"

Returns:

  • (String)

    the team nickname



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

attribute :nickname, Shale::Type::String

#orebInteger

Returns offensive rebounds

Examples:

total.oreb #=> 100

Returns:

  • (Integer)

    offensive rebounds



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

attribute :oreb, Shale::Type::Integer

#pfInteger

Returns personal fouls

Examples:

total.pf #=> 180

Returns:

  • (Integer)

    personal fouls



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

attribute :pf, Shale::Type::Integer

#ptsInteger

Returns points

Examples:

total.pts #=> 1130

Returns:

  • (Integer)

    points



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

attribute :pts, Shale::Type::Integer

#stlInteger

Returns steals

Examples:

total.stl #=> 80

Returns:

  • (Integer)

    steals



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

attribute :stl, Shale::Type::Integer

#team_idInteger

Returns the team ID

Examples:

total.team_id #=> 1610612744

Returns:

  • (Integer)

    the team ID



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

attribute :team_id, Shale::Type::Integer

#team_reboundsInteger

Returns team rebounds

Examples:

total.team_rebounds #=> 450

Returns:

  • (Integer)

    team rebounds



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

attribute :team_rebounds, Shale::Type::Integer

#team_turnoversInteger

Returns team turnovers

Examples:

total.team_turnovers #=> 120

Returns:

  • (Integer)

    team turnovers



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

attribute :team_turnovers, Shale::Type::Integer

#tot_rebInteger

Returns total rebounds

Examples:

total.tot_reb #=> 450

Returns:

  • (Integer)

    total rebounds



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

attribute :tot_reb, Shale::Type::Integer

#tovInteger

Returns turnovers

Examples:

total.tov #=> 120

Returns:

  • (Integer)

    turnovers



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

attribute :tov, Shale::Type::Integer

#wInteger

Returns wins

Examples:

total.w #=> 8

Returns:

  • (Integer)

    wins



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

attribute :w, Shale::Type::Integer

#w_homeInteger

Returns home wins

Examples:

total.w_home #=> 5

Returns:

  • (Integer)

    home wins



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

attribute :w_home, Shale::Type::Integer

#w_roadInteger

Returns road wins

Examples:

total.w_road #=> 3

Returns:

  • (Integer)

    road wins



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

attribute :w_road, Shale::Type::Integer

Instance Method Details

#teamTeam?

Returns the team object

Examples:

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

Returns:

  • (Team, nil)

    the team object



263
264
265
# File 'lib/nba/cume_stats_team_total.rb', line 263

def team
  Teams.find(team_id)
end