Class: ActionDispatch::Cookies::AbstractCookieJar
- Includes:
- ChainedCookieJars
- Defined in:
- actionpack/lib/action_dispatch/middleware/cookies.rb
Overview
:nodoc:
Direct Known Subclasses
EncryptedKeyRotatingCookieJar, PermanentCookieJar, SignedKeyRotatingCookieJar
Instance Method Summary collapse
- #[](name) ⇒ Object
- #[]=(name, options) ⇒ Object
-
#initialize(parent_jar) ⇒ AbstractCookieJar
constructor
A new instance of AbstractCookieJar.
Methods included from ChainedCookieJars
#encrypted, #permanent, #signed, #signed_or_encrypted
Constructor Details
#initialize(parent_jar) ⇒ AbstractCookieJar
Returns a new instance of AbstractCookieJar.
462 463 464 |
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 462 def initialize(parent_jar) @parent_jar = parent_jar end |
Instance Method Details
#[](name) ⇒ Object
466 467 468 469 470 |
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 466 def [](name) if data = @parent_jar[name.to_s] parse(name, data, purpose: "cookie.#{name}") || parse(name, data) end end |