Class: EspnPub::Entities::Game
- Defined in:
- lib/espn_pub/entities/game.rb
Overview
Represents a game between two teams.
Defined Under Namespace
Modules: Type
Constant Summary collapse
Instance Attribute Summary collapse
-
#away_team ⇒ Object
readonly
Returns the value of attribute away_team.
-
#date ⇒ Object
readonly
Returns the value of attribute date.
-
#home_team ⇒ Object
readonly
Returns the value of attribute home_team.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(id:, home_team:, away_team:, date:, type: nil) ⇒ Game
constructor
Initialize a Game entity.
Constructor Details
#initialize(id:, home_team:, away_team:, date:, type: nil) ⇒ Game
Initialize a Game entity.
28 29 30 31 32 33 34 35 |
# File 'lib/espn_pub/entities/game.rb', line 28 def initialize(id:, home_team:, away_team:, date:, type: nil) @id = id @home_team = home_team @away_team = away_team @date = date @type = type super() end |
Instance Attribute Details
#away_team ⇒ Object (readonly)
Returns the value of attribute away_team.
19 20 21 |
# File 'lib/espn_pub/entities/game.rb', line 19 def away_team @away_team end |
#date ⇒ Object (readonly)
Returns the value of attribute date.
19 20 21 |
# File 'lib/espn_pub/entities/game.rb', line 19 def date @date end |
#home_team ⇒ Object (readonly)
Returns the value of attribute home_team.
19 20 21 |
# File 'lib/espn_pub/entities/game.rb', line 19 def home_team @home_team end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
19 20 21 |
# File 'lib/espn_pub/entities/game.rb', line 19 def id @id end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
19 20 21 |
# File 'lib/espn_pub/entities/game.rb', line 19 def type @type end |