Parent

Class Index [+]

Quicksearch

Merb::SessionContainer

Attributes

session_id[R]

:api: private

Public Class Methods

generate() click to toggle source

Generates a new session ID and creates a new session.

Returns

SessionContainer

The new session.

:api: private

    # File lib/merb-core/dispatch/session/container.rb, line 27
27:       def generate
28:       end
inherited(klass) click to toggle source

Register the subclass as an available session store type.

    # File lib/merb-core/dispatch/session/container.rb, line 16
16:       def inherited(klass)
17:         self.subclasses << klass.to_s
18:         super
19:       end
new(session_id) click to toggle source

Parameters

session_id

A unique identifier for this session.

:api: private

    # File lib/merb-core/dispatch/session/container.rb, line 49
49:     def initialize(session_id)
50:       @_destroy = false
51:       self.session_id = session_id
52:     end
setup(request) click to toggle source

Parameters

request

The Merb::Request that came in from Rack.

Notes

If no sessions were found, a new SessionContainer will be generated.

Returns

SessionContainer

a SessionContainer.

:api: private

    # File lib/merb-core/dispatch/session/container.rb, line 40
40:       def setup(request)
41:       end

Public Instance Methods

clear!() click to toggle source

Destroy the current session - clears data and removes session cookie.

:api: private

    # File lib/merb-core/dispatch/session/container.rb, line 80
80:     def clear!
81:       @_destroy = true
82:       self.clear
83:     end
finalize(request) click to toggle source

Teardown and/or persist the current session.

If @_destroy is true, clear out the session completely, including removal of the session cookie itself.

Parameters

request

The Merb::Request that came in from Rack.

:api: private

    # File lib/merb-core/dispatch/session/container.rb, line 74
74:     def finalize(request)
75:     end
regenerate() click to toggle source

Regenerate the session_id.

:api: private

    # File lib/merb-core/dispatch/session/container.rb, line 88
88:     def regenerate
89:     end
session_id=(sid) click to toggle source

Assign a new session_id.

Recreates the cookie with the default expiration time. Useful during log in for pushing back the expiration date.

:api: private

    # File lib/merb-core/dispatch/session/container.rb, line 60
60:     def session_id=(sid)
61:       self.needs_new_cookie = (@session_id && @session_id != sid)
62:       @session_id = sid
63:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.