Sha256: 722f0708c12efba83aa730d116a5aaf813798dcd11a3b14a04ea6461d08b31b5
Contents?: true
Size: 343 Bytes
Versions: 6
Compression:
Stored size: 343 Bytes
Contents
require "tempfile" module MiniMagick class ImageTempFile < Tempfile def make_tmpname(basename, n) # force tempfile to use basename's extension if provided ext = File.extname(basename) # force hyphens instead of periods in name sprintf('%s%d-%d%s', File.basename(basename, ext), $$, n, ext) end end end
Version data entries
6 entries across 6 versions & 3 rubygems