class method self.encode64

Ruby on Rails 3.0.20

Since v2.2.3 Last seen in v3.2.22.5

Available in: v2.2.3 v2.3.18 v3.0.20 v3.1.12 v3.2.22.5

Signature

self.encode64(data)

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"

Parameters

data req
Source
# File activesupport/lib/active_support/base64.rb, line 20
      def self.encode64(data)
        [data].pack("m")
      end

Defined in activesupport/lib/active_support/base64.rb line 20 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::Base64

Type at least 2 characters to search.

↑↓ navigate · open · esc close