Class: Replay::EventEnvelope
- Inherits:
-
Object
- Object
- Replay::EventEnvelope
- Defined in:
- lib/replay/event_envelope.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#stream_id ⇒ Object
readonly
Returns the value of attribute stream_id.
Instance Method Summary collapse
-
#initialize(stream_id, event, metadata = {}) ⇒ EventEnvelope
constructor
A new instance of EventEnvelope.
- #method_missing(method, *args) ⇒ Object
- #type ⇒ Object
Constructor Details
#initialize(stream_id, event, metadata = {}) ⇒ 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
#event ⇒ Object (readonly)
Returns the value of attribute event.
3 4 5 |
# File 'lib/replay/event_envelope.rb', line 3 def event @event end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
3 4 5 |
# File 'lib/replay/event_envelope.rb', line 3 def end |
#stream_id ⇒ Object (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
#type ⇒ Object
10 11 12 |
# File 'lib/replay/event_envelope.rb', line 10 def type @event.type end |