Class: ActionController::TestSession
- Defined in:
- lib/action_controller/test_process.rb
Overview
:nodoc:
Instance Attribute Summary collapse
-
#session_id ⇒ Object
Returns the value of attribute session_id.
Instance Method Summary collapse
- #[](key) ⇒ Object
- #[]=(key, value) ⇒ Object
- #close ⇒ Object
- #data ⇒ Object
- #delete ⇒ Object
-
#initialize(attributes = nil) ⇒ TestSession
constructor
A new instance of TestSession.
- #update ⇒ Object
Constructor Details
#initialize(attributes = nil) ⇒ TestSession
Returns a new instance of TestSession.
283 284 285 286 287 |
# File 'lib/action_controller/test_process.rb', line 283 def initialize(attributes = nil) @session_id = '' @attributes = attributes @saved_attributes = nil end |
Instance Attribute Details
#session_id ⇒ Object
Returns the value of attribute session_id.
281 282 283 |
# File 'lib/action_controller/test_process.rb', line 281 def session_id @session_id end |
Instance Method Details
#[](key) ⇒ Object
293 294 295 |
# File 'lib/action_controller/test_process.rb', line 293 def [](key) data[key] end |
#[]=(key, value) ⇒ Object
297 298 299 |
# File 'lib/action_controller/test_process.rb', line 297 def []=(key, value) data[key] = value end |
#close ⇒ Object
309 310 311 312 |
# File 'lib/action_controller/test_process.rb', line 309 def close update delete end |
#data ⇒ Object
289 290 291 |
# File 'lib/action_controller/test_process.rb', line 289 def data @attributes ||= @saved_attributes || {} end |
#delete ⇒ Object
305 306 307 |
# File 'lib/action_controller/test_process.rb', line 305 def delete @attributes = nil end |
#update ⇒ Object
301 302 303 |
# File 'lib/action_controller/test_process.rb', line 301 def update @saved_attributes = @attributes end |