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

#arena ⇒ String

Returns the arena where the game is played

Examples:

game.arena #=> "Chase Center"

Returns:

  • (String) —

    the arena name



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

attribute :arena, Shale::Type::String

#away_score ⇒ Integer

Returns the away team score

Examples:

game.away_score #=> 108

Returns:

  • (Integer) —

    the away team score



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

attribute :away_score, Shale::Type::Integer

#away_team ⇒ Team

Returns the away team

Examples:

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

Returns:

  • (Team) —

    the away team



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

attribute :away_team, Team

#date ⇒ String

Returns the date of the game

Examples:

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

Returns:

  • (String) —

    the date of the game



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

attribute :date, Shale::Type::String

#home_score ⇒ Integer

Returns the home team score

Examples:

game.home_score #=> 112

Returns:

  • (Integer) —

    the home team score



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

attribute :home_score, Shale::Type::Integer

#home_team ⇒ Team

Returns the home team

Examples:

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

Returns:

  • (Team) —

    the home team



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

attribute :home_team, Team

#id ⇒ String

Returns the unique identifier for the game

Examples:

game.id #=> "0022400001"

Returns:

  • (String) —

    the unique identifier for the game



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

attribute :id, Shale::Type::String

#status ⇒ String

Returns the game status

Examples:

game.status #=> "Final"

Returns:

  • (String) —

    the game status



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

attribute :status, Shale::Type::String