Class: ActionController::TestSession
Do not use. This class is for internal use only.
Relationships & Source Files | |
Super Chains via Extension / Inclusion / Inheritance | |
Class Chain:
self,
Rack::Session::Abstract::PersistedSecure::SecureSessionHash
|
|
Instance Chain:
self,
Rack::Session::Abstract::PersistedSecure::SecureSessionHash
|
|
Inherits: |
Rack::Session::Abstract::PersistedSecure::SecureSessionHash
|
Defined in: | actionpack/lib/action_controller/test_case.rb |
Overview
Constant Summary
-
DEFAULT_OPTIONS =
# File 'actionpack/lib/action_controller/test_case.rb', line 190Rack::Session::Abstract::Persisted::DEFAULT_OPTIONS
Class Method Summary
Instance Attribute Summary
- #enabled? ⇒ Boolean readonly
- #exists? ⇒ Boolean readonly
Instance Method Summary
Constructor Details
.new(session = {}, id = Rack::Session::SessionId.new(SecureRandom.hex(16))) ⇒ TestSession
# File 'actionpack/lib/action_controller/test_case.rb', line 192
def initialize(session = {}, id = Rack::Session::SessionId.new(SecureRandom.hex(16))) super(nil, nil) @id = id @data = stringify_keys(session) @loaded = true @initially_empty = @data.empty? end
Instance Attribute Details
#enabled? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'actionpack/lib/action_controller/test_case.rb', line 225
def enabled? true end
#exists? ⇒ Boolean
(readonly)
[ GitHub ]
# File 'actionpack/lib/action_controller/test_case.rb', line 200
def exists? true end
Instance Method Details
#destroy
[ GitHub ]# File 'actionpack/lib/action_controller/test_case.rb', line 212
def destroy clear end
#dig(*keys)
[ GitHub ]#fetch(key, *args, &block)
[ GitHub ]# File 'actionpack/lib/action_controller/test_case.rb', line 221
def fetch(key, *args, &block) @data.fetch(key.to_s, *args, &block) end
#id_was
[ GitHub ]# File 'actionpack/lib/action_controller/test_case.rb', line 229
def id_was @id end
#keys
[ GitHub ]# File 'actionpack/lib/action_controller/test_case.rb', line 204
def keys @data.keys end
#load! (private)
[ GitHub ]# File 'actionpack/lib/action_controller/test_case.rb', line 234
def load! @id end
#values
[ GitHub ]# File 'actionpack/lib/action_controller/test_case.rb', line 208
def values @data.values end