Class: Replay::EventEnvelope

Inherits:
Object
  • Object
show all
Defined in:
lib/replay/event_envelope.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stream_id, event, metadata = {}) ⇒ EventEnvelope

Returns a new instance of EventEnvelope.



4
5
6
7
8
# File 'lib/replay/event_envelope.rb', line 4

def initialize(stream_id, event,  = {})
   = 
  @event = event
  @stream_id = stream_id
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args) ⇒ Object



14
15
16
17
# File 'lib/replay/event_envelope.rb', line 14

def method_missing(method, *args)
  return @event.send(method, args) if @event.respond_to?(method)
  super
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



3
4
5
# File 'lib/replay/event_envelope.rb', line 3

def event
  @event
end

#metadataObject (readonly)

Returns the value of attribute metadata.



3
4
5
# File 'lib/replay/event_envelope.rb', line 3

def 
  
end

#stream_idObject (readonly)

Returns the value of attribute stream_id.



3
4
5
# File 'lib/replay/event_envelope.rb', line 3

def stream_id
  @stream_id
end

Instance Method Details

#typeObject



10
11
12
# File 'lib/replay/event_envelope.rb', line 10

def type
  @event.type
end