This is mixed into Merb::Controller on framework boot.
:api: private
# File lib/merb-core/dispatch/session.rb, line 59 59: def self.included(base) 60: # Register a callback to finalize sessions - needs to run before the cookie 61: # callback extracts Set-Cookie headers from request.cookies. 62: base._after_dispatch_callbacks.unshift lambda { |c| c.request.finalize_session } 63: end
String | A random 32 character string for use as a unique session ID. |
:api: private
# File lib/merb-core/dispatch/session.rb, line 82 82: def rand_uuid 83: if defined?(SecureRandom) 84: SecureRandom.hex(16) 85: else 86: values = [ 87: rand(0x0010000), 88: rand(0x0010000), 89: rand(0x0010000), 90: rand(0x0010000), 91: rand(0x0010000), 92: rand(0x1000000), 93: rand(0x1000000), 94: ] 95: "%04x%04x%04x%04x%04x%06x%06x" % values 96: end 97: end
session_store | The type of session store to access. |
SessionContainer | The session that was extracted from the request object. |
:api: public
# File lib/merb-core/dispatch/session.rb, line 72 72: def session(session_store = nil) 73: request.session(session_store) 74: end
String | A random 32 character string for use as a unique session ID. |
:api: private
# File lib/merb-core/dispatch/session.rb, line 82 82: def rand_uuid 83: if defined?(SecureRandom) 84: SecureRandom.hex(16) 85: else 86: values = [ 87: rand(0x0010000), 88: rand(0x0010000), 89: rand(0x0010000), 90: rand(0x0010000), 91: rand(0x0010000), 92: rand(0x1000000), 93: rand(0x1000000), 94: ] 95: "%04x%04x%04x%04x%04x%06x%06x" % values 96: end 97: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.