Class: NBA::BoxScoreHustleTeamStat

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

Overview

Represents hustle statistics for a team in a game

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#box_outsInteger

Returns box outs

Examples:

stat.box_outs #=> 25

Returns:

  • (Integer)

    box outs



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

attribute :box_outs, Shale::Type::Integer

#charges_drawnInteger

Returns charges drawn

Examples:

stat.charges_drawn #=> 2

Returns:

  • (Integer)

    charges drawn



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

attribute :charges_drawn, Shale::Type::Integer

#contested_shotsInteger

Returns contested shots

Examples:

stat.contested_shots #=> 45

Returns:

  • (Integer)

    contested shots



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

attribute :contested_shots, Shale::Type::Integer

#contested_shots_2ptInteger

Returns contested 2-point shots

Examples:

stat.contested_shots_2pt #=> 30

Returns:

  • (Integer)

    contested 2-point shots



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

attribute :contested_shots_2pt, Shale::Type::Integer

#contested_shots_3ptInteger

Returns contested 3-point shots

Examples:

stat.contested_shots_3pt #=> 15

Returns:

  • (Integer)

    contested 3-point shots



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

attribute :contested_shots_3pt, Shale::Type::Integer

#def_box_outsInteger

Returns defensive box outs

Examples:

stat.def_box_outs #=> 17

Returns:

  • (Integer)

    defensive box outs



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

attribute :def_box_outs, Shale::Type::Integer

#def_loose_balls_recoveredInteger

Returns defensive loose balls recovered

Examples:

stat.def_loose_balls_recovered #=> 5

Returns:

  • (Integer)

    defensive loose balls recovered



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

attribute :def_loose_balls_recovered, Shale::Type::Integer

#deflectionsInteger

Returns deflections

Examples:

stat.deflections #=> 12

Returns:

  • (Integer)

    deflections



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

attribute :deflections, 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_hustle_team_stat.rb', line 15

attribute :game_id, Shale::Type::String

#loose_balls_recoveredInteger

Returns loose balls recovered

Examples:

stat.loose_balls_recovered #=> 8

Returns:

  • (Integer)

    loose balls recovered



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

attribute :loose_balls_recovered, Shale::Type::Integer

#minString

Returns minutes played

Examples:

stat.min #=> "240:00"

Returns:

  • (String)

    the minutes



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

attribute :min, Shale::Type::String

#off_box_outsInteger

Returns offensive box outs

Examples:

stat.off_box_outs #=> 8

Returns:

  • (Integer)

    offensive box outs



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

attribute :off_box_outs, Shale::Type::Integer

#off_loose_balls_recoveredInteger

Returns offensive loose balls recovered

Examples:

stat.off_loose_balls_recovered #=> 3

Returns:

  • (Integer)

    offensive loose balls recovered



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

attribute :off_loose_balls_recovered, Shale::Type::Integer

#ptsInteger

Returns points scored

Examples:

stat.pts #=> 118

Returns:

  • (Integer)

    points



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

attribute :pts, Shale::Type::Integer

#screen_assistsInteger

Returns screen assists

Examples:

stat.screen_assists #=> 18

Returns:

  • (Integer)

    screen assists



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

attribute :screen_assists, Shale::Type::Integer

#screen_ast_ptsInteger

Returns points from screen assists

Examples:

stat.screen_ast_pts #=> 36

Returns:

  • (Integer)

    screen assist points



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

attribute :screen_ast_pts, 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_hustle_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_hustle_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_hustle_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_hustle_team_stat.rb', line 31

attribute :team_name, Shale::Type::String

Instance Method Details

#gameGame?

Returns the game object

Examples:

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

Returns:

  • (Game, nil)

    the game object



185
186
187
# File 'lib/nba/box_score_hustle_team_stat.rb', line 185

def game
  Games.find(game_id)
end

#teamTeam?

Returns the team object

Examples:

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

Returns:

  • (Team, nil)

    the team object



175
176
177
# File 'lib/nba/box_score_hustle_team_stat.rb', line 175

def team
  Teams.find(team_id)
end