Class: PlaylyfeClient::V2::Event

Inherits:
Object
  • Object
show all
Defined in:
lib/playlyfe_client/v2/event.rb,
lib/playlyfe_client/v2/event.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



4
5
6
# File 'lib/playlyfe_client/v2/event.rb', line 4

def event
  @event
end

#gameObject (readonly)

Returns the value of attribute game.



4
5
6
# File 'lib/playlyfe_client/v2/event.rb', line 4

def game
  @game
end

#timestampObject (readonly)

Returns the value of attribute timestamp.



4
5
6
# File 'lib/playlyfe_client/v2/event.rb', line 4

def timestamp
  @timestamp
end

Class Method Details

.build(ev_hash, game, team_player_or_process = nil) ⇒ Object



33
34
35
36
37
38
# File 'lib/playlyfe_client/v2/event.rb', line 33

def self.build(ev_hash, game, team_player_or_process=nil)   
  event= PlaylyfeClient::V2::PlayerEvent::Base.build(ev_hash,game,team_player_or_process)
  event= PlaylyfeClient::V2::TeamEvent::Base.build(ev_hash,game,team_player_or_process) if event.nil?
  event= PlaylyfeClient::V2::ProcessEvent::Base.build(ev_hash,game,team_player_or_process) if event.nil?
  return event #could be nil!
end

Instance Method Details

#created_atObject



6
7
8
# File 'lib/playlyfe_client/v2/event.rb', line 6

def created_at
  @timestamp
end