Module: Aggro::Aggregate

Extended by:
ActiveSupport::Concern
Includes:
EventDSL, Logging
Included in:
SagaRunner
Defined in:
lib/aggro/aggregate.rb

Overview

Public: Mixin to turn a PORO into an Aggro aggregate.

Instance Method Summary collapse

Methods included from EventDSL

#handles_event?

Instance Method Details

#initialize(id) ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/aggro/aggregate.rb', line 8

def initialize(id)
  @id = id

  start_projections
  restore_from_event_stream

  log INFO, 'Restored to memory'
end