Class: Kameleoon::RealTime::RealTimeEvent

Inherits:
Object
  • Object
show all
Defined in:
lib/kameleoon/real_time/real_time_event.rb

Overview

RealTimeEvent contains information about timestamp when configuration was updated. Timestamp parameter is used to fetch the latest configuration.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event_dict) ⇒ RealTimeEvent

Parametrized initializer. Gets the new time stamp from a JSON message.

Parameters:

  • event_dict (Hash)

    Hash of SSE message data.



17
18
19
# File 'lib/kameleoon/real_time/real_time_event.rb', line 17

def initialize(event_dict)
  @time_stamp = event_dict['ts']
end

Instance Attribute Details

#time_stampObject (readonly)

Returns the value of attribute time_stamp.



11
12
13
# File 'lib/kameleoon/real_time/real_time_event.rb', line 11

def time_stamp
  @time_stamp
end