Module: TorqueBox::Codecs::MarshalBase64

Defined in:
core/lib/torquebox/codecs/marshal_base64.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) decode(data)



29
30
31
# File 'core/lib/torquebox/codecs/marshal_base64.rb', line 29

def decode(data)
  ::Marshal.restore(Base64.decode64(data)) unless data.nil?
end

+ (Object) encode(data)



25
26
27
# File 'core/lib/torquebox/codecs/marshal_base64.rb', line 25

def encode(data)
  Base64.encode64(::Marshal.dump(data)) unless data.nil?
end