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.
490 491 492 |
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 490 def initialize(parent_jar) @parent_jar = parent_jar end |
Instance Method Details
#[](name) ⇒ Object
494 495 496 497 498 499 500 501 502 503 504 |
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 494 def [](name) if data = @parent_jar[name.to_s] result = parse(name, data, purpose: "cookie.#{name}") if result.nil? parse(name, data) else result end end end |