Class: Akasha::Storage::MemoryEventStore
- Inherits:
-
Object
- Object
- Akasha::Storage::MemoryEventStore
- Defined in:
- lib/akasha/storage/memory_event_store.rb,
lib/akasha/storage/memory_event_store/stream.rb
Overview
Memory-based event store.
Defined Under Namespace
Classes: Stream
Instance Attribute Summary collapse
-
#streams ⇒ Object
readonly
Access to streams Example: store.streams.
Instance Method Summary collapse
-
#initialize ⇒ MemoryEventStore
constructor
A new instance of MemoryEventStore.
Constructor Details
#initialize ⇒ MemoryEventStore
Returns a new instance of MemoryEventStore.
12 13 14 |
# File 'lib/akasha/storage/memory_event_store.rb', line 12 def initialize @streams = Hash.new { |streams, name| streams[name] = Stream.new } end |
Instance Attribute Details
#streams ⇒ Object (readonly)
Access to streams Example:
store.streams['some-stream-name']
10 11 12 |
# File 'lib/akasha/storage/memory_event_store.rb', line 10 def streams @streams end |