Module: Aggregates

Defined in:
lib/aggregates.rb,
lib/aggregates/event.rb,
lib/aggregates/domain.rb,
lib/aggregates/auditor.rb,
lib/aggregates/command.rb,
lib/aggregates/identity.rb,
lib/aggregates/event_stream.rb,
lib/aggregates/value_object.rb,
lib/aggregates/domain_object.rb,
lib/aggregates/aggregate_root.rb,
lib/aggregates/command_filter.rb,
lib/aggregates/domain_message.rb,
lib/aggregates/domain_executor.rb,
lib/aggregates/event_processor.rb,
lib/aggregates/storage_backend.rb,
lib/aggregates/command_execution.rb,
lib/aggregates/command_processor.rb,
lib/aggregates/message_processor.rb,
lib/aggregates/command_dispatcher.rb,
lib/aggregates/aggregate_repository.rb,
lib/aggregates/command_validation_error.rb,
lib/aggregates/in_memory_storage_backend.rb

Overview

A helpful library for building CQRS and Event Sourced Applications.

Defined Under Namespace

Modules: Identity, MessageProcessor Classes: AggregateRepository, AggregateRoot, Auditor, Command, CommandDispatcher, CommandExecution, CommandFilter, CommandProcessor, CommandValidationError, Domain, DomainExecutor, DomainMessage, DomainObject, Event, EventProcessor, EventStream, InMemoryStorageBackend, StorageBackend, ValueObject

Class Method Summary collapse

Class Method Details

.create_domain(&block) ⇒ Object



35
36
37
38
39
# File 'lib/aggregates.rb', line 35

def self.create_domain(&block)
  domain = Domain.new
  domain.instance_exec(&block)
  domain
end

.new_aggregate_idObject



27
28
29
# File 'lib/aggregates.rb', line 27

def self.new_aggregate_id
  new_uuid
end

.new_message_idObject



31
32
33
# File 'lib/aggregates.rb', line 31

def self.new_message_id
  new_uuid
end

.new_uuidObject



41
42
43
# File 'lib/aggregates.rb', line 41

def self.new_uuid
  SecureRandom.uuid.to_s
end