Class: ActionDispatch::Cookies::AbstractCookieJar
Do not use. This class is for internal use only.
Relationships & Source Files | |
Extension / Inclusion / Inheritance Descendants | |
Subclasses:
|
|
Super Chains via Extension / Inclusion / Inheritance | |
Instance Chain:
self,
ChainedCookieJars
|
|
Inherits: | Object |
Defined in: | actionpack/lib/action_dispatch/middleware/cookies.rb |
Class Method Summary
- .new(parent_jar) ⇒ AbstractCookieJar constructor
Instance Attribute Summary
ChainedCookieJars
- Included
Instance Method Summary
- #[](name)
- #[]=(name, options)
- #request protected
- #commit(name, options) private
- #cookie_metadata(name, options) private
- #expiry_options(options) private
- #parse(name, data, purpose: nil) private
ChainedCookieJars
- Included
#encrypted | Returns a jar that’ll automatically encrypt cookie values before sending them to the client and will decrypt them for read. |
#permanent | Returns a jar that’ll automatically set the assigned cookies to have an expiration date 20 years from now. |
#signed | Returns a jar that’ll automatically generate a signed representation of cookie value and verify it when reading from the cookie again. |
#signed_or_encrypted | Returns the |
#encrypted_cookie_cipher, #signed_cookie_digest |
Constructor Details
.new(parent_jar) ⇒ AbstractCookieJar
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 509
def initialize(parent_jar) @parent_jar = parent_jar end
Instance Method Details
#[](name)
[ GitHub ]#[]=(name, options)
[ GitHub ]#commit(name, options) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 555
def commit(name, ); end
#cookie_metadata(name, options) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 548
def (name, ) ( ).tap do || [:purpose] = "cookie.#{name}" if request. end end
#expiry_options(options) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 540
def ( ) if [:expires].respond_to?(:from_now) { expires_in: [:expires] } else { expires_at: [:expires] } end end
#parse(name, data, purpose: nil) (private)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 554
def parse(name, data, purpose: nil); data; end
#request (protected)
[ GitHub ]# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 537
def request; @parent_jar.request; end