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

Marshal

Defined Under Namespace

Classes: Marshal

Instance Method Summary collapse

Instance Method Details

#decode(str) ⇒ Object



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

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

#encode(str) ⇒ Object



47
48
49
# File 'lib/rack/session/cookie.rb', line 47

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