Class: Events::MessageCreated
- Inherits:
-
Object
- Object
- Events::MessageCreated
- Defined in:
- lib/events/message_created.rb
Overview
Emitted after a Message record is committed to the database. Subscribers react to persisted messages — not to raw domain events.
Carries the Message record directly so subscribers don’t need to look it up again.
Constant Summary collapse
- TYPE =
"message.created"
Instance Attribute Summary collapse
-
#message ⇒ Object
readonly
Returns the value of attribute message.
Instance Method Summary collapse
- #event_name ⇒ Object
-
#initialize(message) ⇒ MessageCreated
constructor
A new instance of MessageCreated.
- #to_h ⇒ Object
Constructor Details
#initialize(message) ⇒ MessageCreated
Returns a new instance of MessageCreated.
15 16 17 |
# File 'lib/events/message_created.rb', line 15 def initialize() @message = end |
Instance Attribute Details
#message ⇒ Object (readonly)
Returns the value of attribute message.
12 13 14 |
# File 'lib/events/message_created.rb', line 12 def @message end |