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

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/session/cookie.rb

Overview

Encode session cookies as Base64

Direct Known Subclasses

JSON, Marshal, ZipJSON

Defined Under Namespace

Classes: JSON, Marshal, ZipJSON

Instance Method Summary collapse

Instance Method Details

#decode(str) ⇒ Object



54
55
56
# File 'lib/rack/session/cookie.rb', line 54

def decode(str)
  str.unpack('m').first
end

#encode(str) ⇒ Object



50
51
52
# File 'lib/rack/session/cookie.rb', line 50

def encode(str)
  [str].pack('m')
end