Class: Dyno::Event
- Inherits:
-
Object
- Object
- Dyno::Event
- Defined in:
- lib/dyno/event.rb
Instance Attribute Summary collapse
-
#competitors ⇒ Object
Returns the value of attribute competitors.
-
#game ⇒ Object
Returns the value of attribute game.
-
#game_version ⇒ Object
Returns the value of attribute game_version.
-
#time ⇒ Object
Returns the value of attribute time.
-
#track ⇒ Object
Returns the value of attribute track.
Instance Method Summary collapse
-
#initialize(properties = {}) ⇒ Event
constructor
A new instance of Event.
Constructor Details
#initialize(properties = {}) ⇒ Event
Returns a new instance of Event.
8 9 10 11 12 13 14 |
# File 'lib/dyno/event.rb', line 8 def initialize(properties = {}) @time = properties.fetch( :time, Time.now ) @track = properties[:track] @game = properties[:game] @game_version = properties[:game_version] @competitors = properties.fetch( :competitors, [] ) end |
Instance Attribute Details
#competitors ⇒ Object
Returns the value of attribute competitors.
3 4 5 |
# File 'lib/dyno/event.rb', line 3 def competitors @competitors end |
#game ⇒ Object
Returns the value of attribute game.
3 4 5 |
# File 'lib/dyno/event.rb', line 3 def game @game end |
#game_version ⇒ Object
Returns the value of attribute game_version.
3 4 5 |
# File 'lib/dyno/event.rb', line 3 def game_version @game_version end |
#time ⇒ Object
Returns the value of attribute time.
3 4 5 |
# File 'lib/dyno/event.rb', line 3 def time @time end |
#track ⇒ Object
Returns the value of attribute track.
3 4 5 |
# File 'lib/dyno/event.rb', line 3 def track @track end |