Class: Racket::Session

Inherits:
SimpleDelegator
  • Object
show all
Defined in:
lib/racket/session.rb

Overview

Racket::Session is just a thin wrapper around whetever object that is implementing the session storage. By default this is an instance of Rack::Session::Abstract::SessionHash, but Racket::Session will happily wrap anything found in the rack environment.

To provide your own session handler and have it wrapped by Racket::Session, just add your session handler as a middleware and make sure it writes the current session to the key rack.session in the rack environment.

Instance Method Summary collapse

Instance Method Details

#inspectObject Also known as: to_s, to_str

Look the same regardless of what the underlying implementation is.



29
30
31
# File 'lib/racket/session.rb', line 29

def inspect
  "#<#{self.class}:#{object_id}>"
end