Class: Merb::SessionContainer
- Inherits:
-
Mash
- Object
- Mash
- Merb::SessionContainer
- Defined in:
- merb-core/lib/merb-core/dispatch/session/container.rb
Direct Known Subclasses
Instance Attribute Summary (collapse)
- - (Object) needs_new_cookie private
- - (Object) session_id private
Class Method Summary (collapse)
-
+ (SessionContainer) generate
private
Generates a new session ID and creates a new session.
-
+ (Object) inherited(klass)
Register the subclass as an available session store type.
-
+ (SessionContainer) setup(request)
private
A SessionContainer.
Instance Method Summary (collapse)
-
- (Object) clear!
private
Destroy the current session.
-
- (Object) finalize(request)
private
Teardown and/or persist the current session.
-
- (SessionContainer) initialize(session_id)
constructor
private
A new instance of SessionContainer.
-
- (Object) regenerate
private
Regenerate the session_id.
Constructor Details
- (SessionContainer) initialize(session_id)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
A new instance of SessionContainer
45 46 47 48 |
# File 'merb-core/lib/merb-core/dispatch/session/container.rb', line 45 def initialize(session_id) @_destroy = false self.session_id = session_id end |
Instance Attribute Details
- (Object) needs_new_cookie
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'merb-core/lib/merb-core/dispatch/session/container.rb', line 11 def @needs_new_cookie end |
- (Object) session_id
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'merb-core/lib/merb-core/dispatch/session/container.rb', line 9 def session_id @session_id end |
Class Method Details
+ (SessionContainer) generate
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Generates a new session ID and creates a new session.
26 27 |
# File 'merb-core/lib/merb-core/dispatch/session/container.rb', line 26 def generate end |
+ (Object) inherited(klass)
Register the subclass as an available session store type.
16 17 18 19 |
# File 'merb-core/lib/merb-core/dispatch/session/container.rb', line 16 def inherited(klass) self.subclasses << klass.to_s super end |
+ (SessionContainer) setup(request)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
If no sessions were found, a new SessionContainer will be generated.
A SessionContainer.
37 38 |
# File 'merb-core/lib/merb-core/dispatch/session/container.rb', line 37 def setup(request) end |
Instance Method Details
- (Object) clear!
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Destroy the current session. Clears data and removes session cookie.
75 76 77 78 |
# File 'merb-core/lib/merb-core/dispatch/session/container.rb', line 75 def clear! @_destroy = true self.clear end |
- (Object) finalize(request)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Teardown and/or persist the current session.
If @_destroy is true, clear out the session completely, including removal of the session cookie itself.
69 70 |
# File 'merb-core/lib/merb-core/dispatch/session/container.rb', line 69 def finalize(request) end |
- (Object) regenerate
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Regenerate the session_id.
83 84 |
# File 'merb-core/lib/merb-core/dispatch/session/container.rb', line 83 def regenerate end |