Class: CGI::Session::DRbStore
- Defined in:
- lib/action_controller/session/drb_store.rb
Constant Summary collapse
- @@session_data =
DRbObject.new(nil, 'druby://localhost:9192')
Instance Method Summary collapse
- #close ⇒ Object
- #data ⇒ Object
- #delete ⇒ Object
-
#initialize(session, option = nil) ⇒ DRbStore
constructor
A new instance of DRbStore.
- #restore ⇒ Object
- #update ⇒ Object
Constructor Details
#initialize(session, option = nil) ⇒ DRbStore
Returns a new instance of DRbStore.
10 11 12 |
# File 'lib/action_controller/session/drb_store.rb', line 10 def initialize(session, option=nil) @session_id = session.session_id end |
Instance Method Details
#close ⇒ Object
22 23 24 |
# File 'lib/action_controller/session/drb_store.rb', line 22 def close update end |
#data ⇒ Object
30 31 32 |
# File 'lib/action_controller/session/drb_store.rb', line 30 def data @@session_data[@session_id] end |
#delete ⇒ Object
26 27 28 |
# File 'lib/action_controller/session/drb_store.rb', line 26 def delete @@session_data.delete(@session_id) end |
#restore ⇒ Object
14 15 16 |
# File 'lib/action_controller/session/drb_store.rb', line 14 def restore @h = @@session_data[@session_id] || {} end |
#update ⇒ Object
18 19 20 |
# File 'lib/action_controller/session/drb_store.rb', line 18 def update @@session_data[@session_id] = @h end |