Module: ActiveSupport::Base64

Defined in:
lib/active_support/base64.rb

Overview

Ruby 1.9 doesn’t provide base64, so we wrap this here

Class Method Summary collapse

Class Method Details

.decode64(data) ⇒ Object



12
13
14
# File 'lib/active_support/base64.rb', line 12

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

.encode64(data) ⇒ Object



8
9
10
# File 'lib/active_support/base64.rb', line 8

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