Class: NBA::BoxScoreDefensiveTeamStat

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

Overview

Represents defensive statistics for a team in a game

API:

  • public

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#game_idString

Returns the game ID

Examples:

stat.game_id #=> "0022400001"

Returns:

  • the game ID

API:

  • public



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

attribute :game_id, Shale::Type::String

#minutesString

Returns minutes played

Examples:

stat.minutes #=> "240:00"

Returns:

  • the minutes

API:

  • public



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

attribute :minutes, Shale::Type::String

#team_cityString

Returns the team city

Examples:

stat.team_city #=> "Golden State"

Returns:

  • the team city

API:

  • public



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

attribute :team_city, Shale::Type::String

#team_idInteger

Returns the team ID

Examples:

stat.team_id #=> 1610612744

Returns:

  • the team ID

API:

  • public



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

attribute :team_id, Shale::Type::Integer

#team_nameString

Returns the team name

Examples:

stat.team_name #=> "Warriors"

Returns:

  • the team name

API:

  • public



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

attribute :team_name, Shale::Type::String

#team_slugString

Returns the team slug

Examples:

stat.team_slug #=> "warriors"

Returns:

  • the team slug

API:

  • public



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

attribute :team_slug, Shale::Type::String

#team_tricodeString

Returns the team tricode

Examples:

stat.team_tricode #=> "GSW"

Returns:

  • the team tricode

API:

  • public



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

attribute :team_tricode, Shale::Type::String

Instance Method Details

#gameGame?

Returns the game object

Examples:

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

Returns:

  • the game object

API:

  • public



81
82
83
# File 'lib/nba/box_score_defensive_team_stat.rb', line 81

def game
  Games.find(game_id)
end

#teamTeam?

Returns the team object

Examples:

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

Returns:

  • the team object

API:

  • public



71
72
73
# File 'lib/nba/box_score_defensive_team_stat.rb', line 71

def team
  Teams.find(team_id)
end