Module: TMail::Base64
- Defined in:
- lib/action_mailer/vendor/tmail-1.2.1/tmail/base64.rb
Class Method Summary collapse
- .decode(str, strict = false) ⇒ Object
- .encode(str) ⇒ Object
- .folding_encode(str, eol = "\n", limit = 60) ⇒ Object
Class Method Details
.decode(str, strict = false) ⇒ Object
46 47 48 |
# File 'lib/action_mailer/vendor/tmail-1.2.1/tmail/base64.rb', line 46 def decode( str, strict = false ) str.unpack('m').first end |
.encode(str) ⇒ Object
42 43 44 |
# File 'lib/action_mailer/vendor/tmail-1.2.1/tmail/base64.rb', line 42 def encode( str ) [str].pack('m').tr( "\r\n", '' ) end |
.folding_encode(str, eol = "\n", limit = 60) ⇒ Object
38 39 40 |
# File 'lib/action_mailer/vendor/tmail-1.2.1/tmail/base64.rb', line 38 def folding_encode( str, eol = "\n", limit = 60 ) [str].pack('m') end |