module TmpFile

Public Instance Methods

make_tmp_file_from(text = nil) click to toggle source
# File lib/nlp_toolz/helpers/tmp_file.rb, line 7
def make_tmp_file_from text = nil
  tmp_file = ::Tempfile.new('tmp.txt')
  tmp_file.write text unless text.nil?
  tmp_file.rewind
  tmp_file
end