Class: Sourced::Projector::StateStored
- Inherits:
-
Sourced::Projector
- Object
- Sourced::Projector
- Sourced::Projector::StateStored
- Defined in:
- lib/sourced/projector.rb
Overview
A StateStored projector fetches initial state from storage somewhere (DB, files, API) And then after reacting to events and updating state, it can save it back to the same or different storage.
Constant Summary
Constants included from Sync
Constants included from Evolve
Evolve::NOOP_HANDLER, Evolve::PREFIX
Instance Attribute Summary
Attributes inherited from Sourced::Projector
Class Method Summary collapse
Methods inherited from Sourced::Projector
#handle_events, handled_events, #initialize, #inspect
Methods included from Consumer
Methods included from Sync
Methods included from Evolve
Constructor Details
This class inherits a constructor from Sourced::Projector
Class Method Details
.handle_events(events) ⇒ Object
73 74 75 76 |
# File 'lib/sourced/projector.rb', line 73 def handle_events(events) instance = new(events.first.stream_id) instance.handle_events(events) end |