Class: NBA::Game

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

Overview

Represents an NBA game

Instance Attribute Summary collapse

Instance Attribute Details

#arenaString

Returns the arena where the game is played

Examples:

game.arena #=> "Chase Center"


72
# File 'lib/nba/game.rb', line 72

attribute :arena, Shale::Type::String

#away_scoreInteger

Returns the away team score

Examples:

game.away_score #=> 108


64
# File 'lib/nba/game.rb', line 64

attribute :away_score, Shale::Type::Integer

#away_teamTeam

Returns the away team

Examples:

game.away_team #=> #<NBA::Team>


48
# File 'lib/nba/game.rb', line 48

attribute :away_team, Team

#dateString

Returns the date of the game

Examples:

game.date #=> "2024-10-22"


24
# File 'lib/nba/game.rb', line 24

attribute :date, Shale::Type::String

#home_scoreInteger

Returns the home team score

Examples:

game.home_score #=> 112


56
# File 'lib/nba/game.rb', line 56

attribute :home_score, Shale::Type::Integer

#home_teamTeam

Returns the home team

Examples:

game.home_team #=> #<NBA::Team>


40
# File 'lib/nba/game.rb', line 40

attribute :home_team, Team

#idString

Returns the unique identifier for the game

Examples:

game.id #=> "0022400001"


16
# File 'lib/nba/game.rb', line 16

attribute :id, Shale::Type::String

#statusString

Returns the game status

Examples:

game.status #=> "Final"


32
# File 'lib/nba/game.rb', line 32

attribute :status, Shale::Type::String