module TmpFile
Public Instance Methods
delete_and_unlink_tmp_file(tmp_file)
click to toggle source
# File lib/nlp_toolz/helpers/tmp_file.rb, line 14 def delete_and_unlink_tmp_file tmp_file tmp_file.close tmp_file.unlink end
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