Class: CryptReboot::SafeTemp::FileName

Inherits:
Object
  • Object
show all
Defined in:
lib/crypt_reboot/safe_temp/file_name.rb

Overview

Yield non-existing temporary file name located in a safe dir. Afterwards the directory containing this file is deleted.

Instance Method Summary collapse

Instance Method Details

#call(name = 'file') ⇒ Object



8
9
10
11
12
# File 'lib/crypt_reboot/safe_temp/file_name.rb', line 8

def call(name = 'file')
  dir_provider.call do |dir|
    yield File.join(dir, name)
  end
end