Class: Mail::Encodings::QuotedPrintable

Inherits:
Object
  • Object
show all
Defined in:
lib/mail/encodings/quoted_printable.rb

Class Method Summary collapse

Class Method Details

.decode(str) ⇒ Object

Decode the string from Quoted-Printable



7
8
9
# File 'lib/mail/encodings/quoted_printable.rb', line 7

def self.decode(str)
  str.unpack("M*").first
end

.encode(str) ⇒ Object



11
12
13
# File 'lib/mail/encodings/quoted_printable.rb', line 11

def self.encode(str)
  str.gsub( /[^a-z ]/i ) { quoted_printable_encode($&) }
end