Sha256: 1032eede71c898a48a528c22573045f3512251c31d48cb18c7b110e53f629bd7
Contents?: true
Size: 464 Bytes
Versions: 24
Compression:
Stored size: 464 Bytes
Contents
require 'tempfile' class Puppet::FileSystem::Tempfile # Variation of Tempfile.open which ensures that the tempfile is closed and # unlinked before returning # # @param identifier [String] additional part of generated pathname # @yieldparam file [File] the temporary file object # @return result of the passed block # @api private def self.open(identifier) file = ::Tempfile.new(identifier) yield file ensure file.close! end end
Version data entries
24 entries across 24 versions & 1 rubygems