Sha256: 9dea31ab9bf2696ab996143d05f72a13d903eb25daf7cb2b2f4957467baf7423

Contents?: true

Size: 204 Bytes

Versions: 8

Compression:

Stored size: 204 Bytes

Contents

require "tempfile"

class TempfileHandler
  def self.create(string, filename: "tmpfile-contents")
    file = Tempfile.open(filename)
    file.write string
    file.path
  ensure
    file.close
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
dcm-0.0.16 lib/tempfile_handler.rb
dcm-0.0.15 lib/tempfile_handler.rb
dcm-0.0.14 lib/tempfile_handler.rb
dcm-0.0.13 lib/tempfile_handler.rb
dcm-0.0.12 lib/tempfile_handler.rb
dcm-0.0.11 lib/tempfile_handler.rb
dcm-0.0.10 lib/tempfile_handler.rb
dcm-0.0.9 lib/tempfile_handler.rb