Method: ActiveSupport::Base64.encode64

Defined in:
lib/active_support/base64.rb

.encode64(data) ⇒ Object

Encodes a string to its base 64 representation. Each 60 characters of output is separated by a newline character.

ActiveSupport::Base64.encode64("Original unencoded string") 
# => "T3JpZ2luYWwgdW5lbmNvZGVkIHN0cmluZw==\n"


20
21
22
# File 'lib/active_support/base64.rb', line 20

def self.encode64(data)
  [data].pack("m")
end