class Postmark::MittTempfile

Attributes

content_type[RW]

the content type of the “uploaded” file

Public Class Methods

new(basename, content_type, tmpdir=Dir::tmpdir) click to toggle source
Calls superclass method
# File lib/postmark/mitt.rb, line 151
def initialize(basename, content_type, tmpdir=Dir::tmpdir)
  if Postmark.ruby19?
    super(basename, tmpdir, :encoding => 'ascii-8bit')
  else
    super(basename, tmpdir)
  end
  @basename = basename
  @content_type = content_type
end

Public Instance Methods

original_filename() click to toggle source
# File lib/postmark/mitt.rb, line 164
def original_filename
  @basename || file.basename(path)
end