Parent

Methods

Files

Class/Module Index [+]

Quicksearch

Rack::Session::Abstract::ID

ID sets up a basic framework for implementing an id based sessioning service. Cookies sent to the client for maintaining sessions will only contain an id reference. Only get_session and set_session are required to be overwritten.

All parameters are optional.

These options can be set on a per request basis, at the location of env. Additionally the id of the session can be found within the options hash at the key :id. It is highly not recommended to change its value.

Is Rack::Utils::Context compatible.

Not included by default; you must require 'rack/session/abstract/id' to use.

Constants

DEFAULT_OPTIONS

Attributes

default_options[R]
key[R]

Public Class Methods

new(app, options={}) click to toggle source
# File lib/rack/session/abstract/id.rb, line 191
def initialize(app, options={})
  @app = app
  @default_options = self.class::DEFAULT_OPTIONS.merge(options)
  @key = @default_options.delete(:key)
  @cookie_only = @default_options.delete(:cookie_only)
  initialize_sid
end

Public Instance Methods

call(env) click to toggle source
# File lib/rack/session/abstract/id.rb, line 199
def call(env)
  context(env)
end
context(env, app=@app) click to toggle source
# File lib/rack/session/abstract/id.rb, line 203
def context(env, app=@app)
  prepare_session(env)
  status, headers, body = app.call(env)
  commit_session(env, status, headers, body)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.