Sha256: e270f6006acf989c47d91f3f69ee409306281d8e091a22d131647e29f072d178

Contents?: true

Size: 330 Bytes

Versions: 10

Compression:

Stored size: 330 Bytes

Contents

require 'tempfile'

class WickedPdfTempfile < Tempfile
  # ensures the Tempfile's filename always keeps its extension
  def initialize(filename, temp_dir=nil)
    temp_dir  ||= Dir.tmpdir
    extension = File.extname(filename)
    basename  = File.basename(filename, extension)
    super([basename, extension], temp_dir)
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
wicked_pdf-0.11.0 lib/wicked_pdf/tempfile.rb
wicked_pdf-0.10.2 lib/wicked_pdf/tempfile.rb
wicked_pdf-0.10.0 lib/wicked_pdf/tempfile.rb
wicked_pdf-0.9.10 lib/wicked_pdf/tempfile.rb
wicked_pdf-0.9.9 lib/wicked_pdf/tempfile.rb
wicked_pdf-0.9.8 lib/wicked_pdf_tempfile.rb
wicked_pdf-0.9.7 lib/wicked_pdf_tempfile.rb
wicked_pdf-0.9.6 lib/wicked_pdf_tempfile.rb
wicked_pdf-0.9.5 lib/wicked_pdf_tempfile.rb
wicked_pdf-0.9.4 lib/wicked_pdf_tempfile.rb