Method: CmisServer::ContentStream#with_tempfile

Defined in:
lib/cmis_server/content_stream.rb

#with_tempfile(&block) ⇒ Object



41
42
43
44
45
46
47
48
49
# File 'lib/cmis_server/content_stream.rb', line 41

def with_tempfile(&block)
  temp_file=self.tempfile
  begin
    block.call(temp_file)
  ensure
    temp_file.close
    temp_file.unlink
  end
end