Class: Akasha::Storage::MemoryEventStore

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

Constructor Details

#initializeMemoryEventStore

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

#streamsObject (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