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

Returns:

  • (Integer)

    blocks



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

Returns:

  • (Integer)

    blocked attempts



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"

Returns:

  • (String)

    the game ID



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"

Returns:

  • (String)

    the minutes



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

Returns:

  • (Integer)

    opponent second chance points



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

Returns:

  • (Integer)

    opponent fast break points



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

Returns:

  • (Integer)

    opponent points off turnovers



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

Returns:

  • (Integer)

    opponent points in the paint



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

Returns:

  • (Integer)

    personal fouls



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

Returns:

  • (Integer)

    personal fouls drawn



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

Returns:

  • (Integer)

    second chance points



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

Returns:

  • (Integer)

    fast break points



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

Returns:

  • (Integer)

    points off turnovers



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

Returns:

  • (Integer)

    points in the paint



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"

Returns:

  • (String)

    the team abbreviation



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"

Returns:

  • (String)

    the team city



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

Returns:

  • (Integer)

    the team ID



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"

Returns:

  • (String)

    the team name



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>

Returns:

  • (Game, nil)

    the game object



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>

Returns:

  • (Team, nil)

    the team object



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

def team
  Teams.find(team_id)
end