Class: Rack::Session::Cookie::Base64::Marshal

Inherits:
Rack::Session::Cookie::Base64 show all
Defined in:
lib/rack/session/cookie.rb

Overview

Encode session cookies as Marshaled Base64 data

Instance Method Summary collapse

Instance Method Details

#decode(str) ⇒ Object



108
109
110
111
# File 'lib/rack/session/cookie.rb', line 108

def decode(str)
  return unless str
  ::Marshal.load(super(str)) rescue nil
end

#encode(str) ⇒ Object



104
105
106
# File 'lib/rack/session/cookie.rb', line 104

def encode(str)
  super(::Marshal.dump(str))
end