class Aggro::FileStore::Reader
Private: Deserialized events from an IO object.
Public Class Methods
new(data_io, index_io)
click to toggle source
# File lib/aggro/file_store/reader.rb, line 5 def initialize(data_io, index_io) @data_io = data_io @index_io = index_io end
Public Instance Methods
read()
click to toggle source
# File lib/aggro/file_store/reader.rb, line 10 def read Enumerator.new do |yielder| stream.each do |raw_event| yielder << EventSerializer.deserialize(raw_event) end end end
Private Instance Methods
index()
click to toggle source
# File lib/aggro/file_store/reader.rb, line 20 def index @index ||= MarshalStream.new @index_io end
stream()
click to toggle source
# File lib/aggro/file_store/reader.rb, line 24 def stream @stream ||= MarshalStream.new @data_io end