Class: NBA::BoxScoreMiscTeamStat

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

Overview

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#blkInteger

Returns blocks

Examples:

stat.blk #=> 7


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

attribute :blk, Shale::Type::Integer

#blkaInteger

Returns blocked attempts

Examples:

stat.blka #=> 5


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

attribute :blka, Shale::Type::Integer

#game_idString

Returns the game ID

Examples:

stat.game_id #=> "0022400565"


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

attribute :game_id, Shale::Type::String

#minString

Returns total minutes played

Examples:

stat.min #=> "240:00"


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

attribute :min, Shale::Type::String

#opp_pts_2nd_chanceInteger

Returns opponent second chance points

Examples:

stat.opp_pts_2nd_chance #=> 11


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

attribute :opp_pts_2nd_chance, Shale::Type::Integer

#opp_pts_fbInteger

Returns opponent fast break points

Examples:

stat.opp_pts_fb #=> 16


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

attribute :opp_pts_fb, Shale::Type::Integer

#opp_pts_off_tovInteger

Returns opponent points off turnovers

Examples:

stat.opp_pts_off_tov #=> 15


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

attribute :opp_pts_off_tov, Shale::Type::Integer

#opp_pts_paintInteger

Returns opponent points in the paint

Examples:

stat.opp_pts_paint #=> 48


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

attribute :opp_pts_paint, Shale::Type::Integer

#pfInteger

Returns personal fouls

Examples:

stat.pf #=> 21


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

attribute :pf, Shale::Type::Integer

#pfdInteger

Returns personal fouls drawn

Examples:

stat.pfd #=> 19


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

attribute :pfd, Shale::Type::Integer

#pts_2nd_chanceInteger

Returns second chance points

Examples:

stat.pts_2nd_chance #=> 14


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

attribute :pts_2nd_chance, Shale::Type::Integer

#pts_fbInteger

Returns fast break points

Examples:

stat.pts_fb #=> 22


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

attribute :pts_fb, Shale::Type::Integer

#pts_off_tovInteger

Returns points off turnovers

Examples:

stat.pts_off_tov #=> 18


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

attribute :pts_off_tov, Shale::Type::Integer

#pts_paintInteger

Returns points in the paint

Examples:

stat.pts_paint #=> 54


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

attribute :pts_paint, Shale::Type::Integer

#team_abbreviationString

Returns the team abbreviation

Examples:

stat.team_abbreviation #=> "GSW"


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

attribute :team_abbreviation, Shale::Type::String

#team_cityString

Returns the team city

Examples:

stat.team_city #=> "Golden State"


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

attribute :team_city, Shale::Type::String

#team_idInteger

Returns the team ID

Examples:

stat.team_id #=> 1610612744


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

attribute :team_id, Shale::Type::Integer

#team_nameString

Returns the team name

Examples:

stat.team_name #=> "Warriors"


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

attribute :team_name, Shale::Type::String

Instance Method Details

#gameGame?

Returns the game object for this box score

Examples:

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


169
170
171
# File 'lib/nba/box_score_misc_team_stat.rb', line 169

def game
  Games.find(game_id)
end

#teamTeam?

Returns the team object

Examples:

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


159
160
161
# File 'lib/nba/box_score_misc_team_stat.rb', line 159

def team
  Teams.find(team_id)
end