Class: BFS::Bucket::InMem::Writer

Inherits:
StringIO
  • Object
show all
Includes:
Writer::Mixin
Defined in:
lib/bfs/bucket/in_mem.rb

Instance Method Summary collapse

Methods included from Writer::Mixin

#commit, #discard, #perform

Constructor Details

#initialize(encoding:, &on_commit) ⇒ Writer

Returns a new instance of Writer.



14
15
16
17
18
19
20
# File 'lib/bfs/bucket/in_mem.rb', line 14

def initialize(encoding:, &on_commit)
  @on_commit = on_commit

  sio = StringIO.new
  sio.set_encoding(encoding)
  super sio
end