Class: Puppet::FileSystem::Tempfile
- Defined in:
- lib/puppet/file_system/tempfile.rb
Class Method Summary collapse
-
.open(identifier) {|file| ... } ⇒ Object
private
Variation of Tempfile.open which ensures that the tempfile is closed and unlinked before returning.
Class Method Details
.open(identifier) {|file| ... } ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Variation of Tempfile.open which ensures that the tempfile is closed and unlinked before returning
12 13 14 15 16 17 18 19 |
# File 'lib/puppet/file_system/tempfile.rb', line 12 def self.open(identifier) file = ::Tempfile.new(identifier) yield file ensure file.close! end |