Methods
C
N
Attributes
[R] path
Class Public methods
new(basename = nil, dirname = nil)
# File lib/inochi/util/tempdir.rb, line 12
  def initialize basename = nil, dirname = nil
    args = [basename || File.basename($0), dirname].compact
    file = Tempfile.new(*args)

    @path = file.path

    # replace the file with a directory
    file.close!
    FileUtils.mkdir_p @path

    # clean up on exit
    at_exit { close }
  end
Instance Public methods
close()
# File lib/inochi/util/tempdir.rb, line 26
  def close
    FileUtils.rm_rf @path
  end