Class: Kameleoon::RealTime::SseMessage

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

Overview

SseMessage is a container for a received SSE message.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event, id, data) ⇒ SseMessage

Parametrized initializer.

Parameters:

  • event (String)
  • id (String)
  • data (String)


16
17
18
19
20
# File 'lib/kameleoon/real_time/sse_message.rb', line 16

def initialize(event, id, data)
  @event = event
  @id = id
  @data = data
end

Instance Attribute Details

#dataObject (readonly)

Returns the value of attribute data.



8
9
10
# File 'lib/kameleoon/real_time/sse_message.rb', line 8

def data
  @data
end

#eventObject (readonly)

Returns the value of attribute event.



8
9
10
# File 'lib/kameleoon/real_time/sse_message.rb', line 8

def event
  @event
end

#idObject (readonly)

Returns the value of attribute id.



8
9
10
# File 'lib/kameleoon/real_time/sse_message.rb', line 8

def id
  @id
end