Class: Dir

Inherits:
Object
  • Object
show all
Defined in:
lib/environment.rb

Class Method Summary collapse

Class Method Details

.mktmpdirObject



27
28
29
30
31
32
# File 'lib/environment.rb', line 27

def self.mktmpdir
    t = (Time.now.to_f * 1_000_000).to_i.to_s(36)
    path = "#{tmpdir}/d#{t}-#{$$}-#{rand(0x100000000).to_s(36)}"
    Dir.mkdir path
    path
end