Class: Mail::Encodings::QuotedPrintable
- Inherits:
-
Object
- Object
- Mail::Encodings::QuotedPrintable
- Defined in:
- lib/mail/encodings/quoted_printable.rb
Class Method Summary collapse
-
.decode(str) ⇒ Object
Decode the string from Quoted-Printable.
- .encode(str) ⇒ Object
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 |