Sha256: dfad9cdd4550217500f225d82d8d06f4b887dbc22e1b74ad7a166fdf8d8a9d67

Contents?: true

Size: 307 Bytes

Versions: 2

Compression:

Stored size: 307 Bytes

Contents

module ActiveSupport
  if defined? ::Base64
    Base64 = ::Base64
  else
    # Ruby 1.9 doesn't provide base64, so we wrap this here
    module Base64

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

      def self.decode64(data)
        data.unpack("m").first
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
activesupport-2.0.5 lib/active_support/base64.rb
activesupport-2.0.4 lib/active_support/base64.rb