Class: Dyno::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/dyno/event.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(properties = {}) ⇒ Event

Returns a new instance of Event.

Parameters:

  • properties (Hash) (defaults to: {})

    Event information.



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

#competitorsObject

Returns the value of attribute competitors.



3
4
5
# File 'lib/dyno/event.rb', line 3

def competitors
  @competitors
end

#gameObject

Returns the value of attribute game.



3
4
5
# File 'lib/dyno/event.rb', line 3

def game
  @game
end

#game_versionObject

Returns the value of attribute game_version.



3
4
5
# File 'lib/dyno/event.rb', line 3

def game_version
  @game_version
end

#timeObject

Returns the value of attribute time.



3
4
5
# File 'lib/dyno/event.rb', line 3

def time
  @time
end

#trackObject

Returns the value of attribute track.



3
4
5
# File 'lib/dyno/event.rb', line 3

def track
  @track
end