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.
280 281 282 283 284 |
# File 'lib/action_controller/test_process.rb', line 280 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.
278 279 280 |
# File 'lib/action_controller/test_process.rb', line 278 def session_id @session_id end |
Instance Method Details
#[](key) ⇒ Object
290 291 292 |
# File 'lib/action_controller/test_process.rb', line 290 def [](key) data[key] end |
#[]=(key, value) ⇒ Object
294 295 296 |
# File 'lib/action_controller/test_process.rb', line 294 def []=(key, value) data[key] = value end |
#close ⇒ Object
306 307 308 309 |
# File 'lib/action_controller/test_process.rb', line 306 def close update delete end |
#data ⇒ Object
286 287 288 |
# File 'lib/action_controller/test_process.rb', line 286 def data @attributes ||= @saved_attributes || {} end |
#delete ⇒ Object
302 303 304 |
# File 'lib/action_controller/test_process.rb', line 302 def delete @attributes = nil end |
#update ⇒ Object
298 299 300 |
# File 'lib/action_controller/test_process.rb', line 298 def update @saved_attributes = @attributes end |