Module: TMail::Base64

Defined in:
lib/gems/tmail-1.2.3.1/lib/tmail/base64.rb

Class Method Summary collapse

Class Method Details

.decode(str, strict = false) ⇒ Object



40
41
42
# File 'lib/gems/tmail-1.2.3.1/lib/tmail/base64.rb', line 40

def decode( str, strict = false )
  str.unpack('m').first
end

.encode(str) ⇒ Object



36
37
38
# File 'lib/gems/tmail-1.2.3.1/lib/tmail/base64.rb', line 36

def encode( str )
  [str].pack('m').tr( "\r\n", '' )
end

.folding_encode(str, eol = "\n", limit = 60) ⇒ Object



32
33
34
# File 'lib/gems/tmail-1.2.3.1/lib/tmail/base64.rb', line 32

def folding_encode( str, eol = "\n", limit = 60 )
  [str].pack('m')
end