Sha256: cbd811527e1fb40b07f98d2b452b91a24f84c23c8caef988fd6188a11bdde23f
Contents?: true
Size: 293 Bytes
Versions: 21
Compression:
Stored size: 293 Bytes
Contents
require 'securerandom' #module Wixgem def temp_directory tmp_file = "#{ENV['TEMP'].gsub(/\\/,'/')}/#{SecureRandom.hex}" FileUtils.mkpath(tmp_file) begin yield tmp_file rescue Exception => e raise e ensure sleep(0.1) FileUtils.rm_rf(tmp_file) end end #end
Version data entries
21 entries across 21 versions & 1 rubygems