Class: GPG::TempPathHelper
- Inherits:
-
Object
- Object
- GPG::TempPathHelper
- Defined in:
- lib/pgp/gpg/temp_path_helper.rb
Class Method Summary collapse
Class Method Details
.create(&block) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/pgp/gpg/temp_path_helper.rb', line 3 def self.create(&block) path = File.join(Dir.tmpdir, random_string) yield(path) if block path ensure delete(path) end |