Class: Synapse::Domain::EventMessage
- Defined in:
- lib/synapse/domain/message.rb
Overview
Represents the occurance of an event in the application that may be of some importance to another component of the application. It contains the relevant data for other components to act upon.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#timestamp ⇒ Time
readonly
The timestamp of when the event was reported.
Attributes inherited from Message
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Message
#and_metadata, as_message, build, #payload_type, #with_metadata
Constructor Details
#initialize(id, metadata, payload, timestamp) ⇒ undefined
16 17 18 19 |
# File 'lib/synapse/domain/message.rb', line 16 def initialize(id, , payload, ) super id, , payload @timestamp = end |
Instance Attribute Details
#timestamp ⇒ Time (readonly)
The timestamp of when the event was reported
9 10 11 |
# File 'lib/synapse/domain/message.rb', line 9 def @timestamp end |
Class Method Details
.builder ⇒ Class
22 23 24 |
# File 'lib/synapse/domain/message.rb', line 22 def self.builder EventMessageBuilder end |