Class: EspnPub::Entities::Game

Inherits:
Base
  • Object
show all
Defined in:
lib/espn_pub/entities/game.rb

Overview

Represents a game between two teams.

Instance Attribute Summary collapse

Attributes inherited from Base

#client

Instance Method Summary collapse

Constructor Details

#initialize(id:, home_team:, away_team:, date:) ⇒ Game

Initialize a Game entity.

Parameters:



15
16
17
18
19
20
21
# File 'lib/espn_pub/entities/game.rb', line 15

def initialize(id:, home_team:, away_team:, date:)
  @id = id
  @home_team = home_team
  @away_team = away_team
  @date = date
  super()
end

Instance Attribute Details

#away_teamObject (readonly)

Returns the value of attribute away_team.



7
8
9
# File 'lib/espn_pub/entities/game.rb', line 7

def away_team
  @away_team
end

#dateObject (readonly)

Returns the value of attribute date.



7
8
9
# File 'lib/espn_pub/entities/game.rb', line 7

def date
  @date
end

#home_teamObject (readonly)

Returns the value of attribute home_team.



7
8
9
# File 'lib/espn_pub/entities/game.rb', line 7

def home_team
  @home_team
end

#idObject (readonly)

Returns the value of attribute id.



7
8
9
# File 'lib/espn_pub/entities/game.rb', line 7

def id
  @id
end