Parent

Included Modules

Class/Module Index [+]

Quicksearch

TMail::Attachment

Attributes

content_type[RW]
original_filename[RW]

Public Instance Methods

original_filename(to_charset = 'utf-8') click to toggle source

Only unquote if quoted

# File lib/tmail/quoting.rb, line 68
def original_filename(to_charset = 'utf-8')
  if quoted?(quoted_filename)
    Unquoter.unquote_and_convert_to(quoted_filename, to_charset).chomp
  else
    quoted_filename
  end
end
Also aliased as: quoted_filename
quoted?(string) click to toggle source
# File lib/tmail/quoting.rb, line 63
def quoted?(string)
  !!((string =~ /.+'\w\w'.+/) || (string =~ /=\?.+\?.\?.+\?=/))
end
quoted_filename(to_charset = 'utf-8') click to toggle source
Alias for: original_filename

[Validate]

Generated with the Darkfish Rdoc Generator 2.