Class: EspnPub::Entities::Game
- Defined in:
- lib/espn_pub/entities/game.rb
Overview
Represents a game between two teams.
Instance Attribute Summary collapse
-
#away_team_id ⇒ Object
readonly
Returns the value of attribute away_team_id.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#home_team_id ⇒ Object
readonly
Returns the value of attribute home_team_id.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(id:, home_team_id:, away_team_id:, date:) ⇒ Game
constructor
Initialize a Game entity.
Constructor Details
#initialize(id:, home_team_id:, away_team_id:, date:) ⇒ Game
Initialize a Game entity.
15 16 17 18 19 20 21 |
# File 'lib/espn_pub/entities/game.rb', line 15 def initialize(id:, home_team_id:, away_team_id:, date:) @id = id @home_team_id = home_team_id @away_team_id = away_team_id @date = date super() end |
Instance Attribute Details
#away_team_id ⇒ Object (readonly)
Returns the value of attribute away_team_id.
7 8 9 |
# File 'lib/espn_pub/entities/game.rb', line 7 def away_team_id @away_team_id end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
7 8 9 |
# File 'lib/espn_pub/entities/game.rb', line 7 def date @date end |
#home_team_id ⇒ Object (readonly)
Returns the value of attribute home_team_id.
7 8 9 |
# File 'lib/espn_pub/entities/game.rb', line 7 def home_team_id @home_team_id end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/espn_pub/entities/game.rb', line 7 def id @id end |