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


17
18
19
# File 'lib/active_support/base64.rb', line 17

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

.encode64(data) ⇒ Object


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

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