Class: Mail::Encodings::UnixToUnix

Inherits:
TransferEncoding show all
Defined in:
lib/mail/encodings/unix_to_unix.rb

Constant Summary collapse

NAME =
"x-uuencode"

Constants inherited from TransferEncoding

TransferEncoding::PRIORITY

Class Method Summary collapse

Methods inherited from TransferEncoding

can_encode?, can_transport?, compatible_input?, cost, lowest_cost, negotiate, renegotiate, to_s

Class Method Details

.decode(str) ⇒ Object



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

def self.decode(str)
  str.sub(/\Abegin \d+ [^\n]*\n/, '').unpack1('u')
end

.encode(str) ⇒ Object



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

def self.encode(str)
  [str].pack("u")
end