Method: BFS::Writer#initialize

Defined in:
lib/bfs/helpers.rb

#initialize(name, tempdir: nil, perm: nil, **opts, &on_commit) ⇒ Writer

Returns a new instance of Writer.



36
37
38
39
40
41
42
# File 'lib/bfs/helpers.rb', line 36

def initialize(name, tempdir: nil, perm: nil, **opts, &on_commit)
  @on_commit = on_commit

  tempfile = ::Tempfile.new(File.basename(name.to_s), tempdir, **opts)
  tempfile.chmod(perm) if perm
  super tempfile
end