Class: TempfileHandler
Class Method Summary collapse
Class Method Details
.create(string, filename: "tmpfile-contents") ⇒ Object
4 5 6 7 8 9 10 |
# File 'lib/tempfile_handler.rb', line 4 def self.create(string, filename: "tmpfile-contents") file = Tempfile.open(filename) file.write string file.path ensure file.close end |