Class: Aggregates::DomainMessage

Inherits:
DomainObject show all
Defined in:
lib/aggregates/domain_message.rb

Overview

The DomainMessage is not a class that should generally be interacted with unless extending Aggregates itself. It provides some core functionality that message types (Event and Command) both require.

Direct Known Subclasses

Command, Event

Instance Method Summary collapse

Methods inherited from DomainObject

json_create, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ DomainMessage

Returns a new instance of DomainMessage.



8
9
10
# File 'lib/aggregates/domain_message.rb', line 8

def initialize(attributes = {})
  super(attributes.merge({ message_id: Aggregates.new_message_id, created_at: Time.now }))
end