Class: Synapse::EventSourcing::AggregateSnapshotTaker
- Inherits:
-
SnapshotTaker
- Object
- SnapshotTaker
- Synapse::EventSourcing::AggregateSnapshotTaker
- Defined in:
- lib/synapse/event_sourcing/snapshot/aggregate_taker.rb
Overview
Snapshot taker that uses the actual aggregate and its state to create a snapshot event
Instance Attribute Summary
Attributes inherited from SnapshotTaker
Instance Method Summary collapse
Methods inherited from SnapshotTaker
Constructor Details
#initialize ⇒ undefined
6 7 8 9 |
# File 'lib/synapse/event_sourcing/snapshot/aggregate_taker.rb', line 6 def initialize super @aggregate_factories = Hash.new end |
Instance Method Details
#register_factory(factory) ⇒ undefined
13 14 15 |
# File 'lib/synapse/event_sourcing/snapshot/aggregate_taker.rb', line 13 def register_factory(factory) @aggregate_factories.store factory.type_identifier, factory end |