Class: CGI::Session
- Defined in:
- lib/action_controller/cgi_ext/session.rb,
lib/action_controller/session/drb_store.rb,
lib/action_controller/session/active_record_store.rb
Overview
-
Expose the CGI instance to session stores.
-
Don’t require ‘digest/md5’ whenever a new session id is generated.
Defined Under Namespace
Classes: ActiveRecordStore, CookieStore, DRbStore, PStore
Instance Attribute Summary collapse
-
#cgi ⇒ Object
readonly
Make the CGI instance available to session stores.
-
#data ⇒ Object
readonly
Returns the value of attribute data.
-
#dbman ⇒ Object
readonly
Returns the value of attribute dbman.
Instance Method Summary collapse
-
#initialize(cgi, options = {}) ⇒ Session
constructor
A new instance of Session.
- #initialize_without_cgi_reader ⇒ Object
-
#model ⇒ Object
Return this session’s underlying Session instance.
Constructor Details
#initialize(cgi, options = {}) ⇒ Session
Returns a new instance of Session.
37 38 39 40 |
# File 'lib/action_controller/cgi_ext/session.rb', line 37 def initialize(cgi, = {}) @cgi = cgi initialize_without_cgi_reader(cgi, ) end |
Instance Attribute Details
#cgi ⇒ Object (readonly)
Make the CGI instance available to session stores.
34 35 36 |
# File 'lib/action_controller/cgi_ext/session.rb', line 34 def cgi @cgi end |
#data ⇒ Object (readonly)
Returns the value of attribute data.
7 8 9 |
# File 'lib/action_controller/session/active_record_store.rb', line 7 def data @data end |
#dbman ⇒ Object (readonly)
Returns the value of attribute dbman.
35 36 37 |
# File 'lib/action_controller/cgi_ext/session.rb', line 35 def dbman @dbman end |
Instance Method Details
#initialize_without_cgi_reader ⇒ Object
36 |
# File 'lib/action_controller/cgi_ext/session.rb', line 36 alias_method :initialize_without_cgi_reader, :initialize |
#model ⇒ Object
Return this session’s underlying Session instance. Useful for the DB-backed session stores.
10 11 12 |
# File 'lib/action_controller/session/active_record_store.rb', line 10 def model @dbman.model if @dbman end |