lib/astrails/safe/tmp_file.rb in astrails-safe-0.0.8 vs lib/astrails/safe/tmp_file.rb in astrails-safe-0.0.9
- old
+ new
@@ -3,9 +3,13 @@
module Safe
module TmpFile
@KEEP_FILES = []
TMPDIR = Dir.mktmpdir
+ def self.cleanup
+ FileUtils.remove_entry_secure TMPDIR
+ end
+
def self.create(name)
# create temp directory
file = Tempfile.new(name, TMPDIR)