Writing to a Temporary File : Tempfile « File Directory « Ruby
- Ruby
- File Directory
- Tempfile
Writing to a Temporary File
require 'tempfile'
out = Tempfile.new("tempfile")
out.path
out << "Some text."
out.rewind
out.read
out.close
Related examples in the same category