Sha256: 1e973127ac1cf1d029fa85d23d2b8864bf021a52c156d7246ae862fdc3fc0717
Contents?: true
Size: 276 Bytes
Versions: 19
Compression:
Stored size: 276 Bytes
Contents
require 'tempfile' class Tempfile def self.open_with_block(name = nil, dir = nil) name ||= (0..8).map{rand(36).to_s(36)}.join args = dir ? [name, dir] : [name] tmp = Tempfile.open *args begin yield tmp ensure tmp.close true end end end
Version data entries
19 entries across 19 versions & 3 rubygems