Class: Alvalaxia::Game
- Inherits:
-
Object
- Object
- Alvalaxia::Game
- Defined in:
- lib/alvalaxia/game.rb
Overview
Contains needed info of a game
Instance Attribute Summary collapse
-
#competition ⇒ Object
Returns the value of attribute competition.
-
#date ⇒ Object
Returns the value of attribute date.
-
#opponent ⇒ Object
Returns the value of attribute opponent.
Instance Method Summary collapse
-
#initialize(date, opponent, competition) ⇒ Game
constructor
A new instance of Game.
Constructor Details
#initialize(date, opponent, competition) ⇒ Game
Returns a new instance of Game.
10 11 12 13 14 |
# File 'lib/alvalaxia/game.rb', line 10 def initialize(date, opponent, competition) @date = Time.parse(date.gsub('/', '-')) @opponent = opponent @competition = competition end |
Instance Attribute Details
#competition ⇒ Object
Returns the value of attribute competition.
8 9 10 |
# File 'lib/alvalaxia/game.rb', line 8 def competition @competition end |
#date ⇒ Object
Returns the value of attribute date.
8 9 10 |
# File 'lib/alvalaxia/game.rb', line 8 def date @date end |
#opponent ⇒ Object
Returns the value of attribute opponent.
8 9 10 |
# File 'lib/alvalaxia/game.rb', line 8 def opponent @opponent end |