Class: Cybertrain::SignedCookieJar
- Inherits:
-
Object
- Object
- Cybertrain::SignedCookieJar
- Defined in:
- cybertrain/cookie_jar.rb
Overview
cookies.signed: values the client can read but not change.
Instance Method Summary collapse
-
#[](name) ⇒ String?
The value, or nil when the cookie is missing or its signature does not match.
-
#[]=(name, value) ⇒ String
-
#delete(name, path: "/") ⇒ String?
The raw (signed) value it had.
Instance Method Details
#[](name) ⇒ String?
The value, or nil when the cookie is missing or its signature does not match.
328 329 330 |
# File 'cybertrain/cookie_jar.rb', line 328 def [](name) @jar.(name.to_s) end |
#[]=(name, value) ⇒ String
336 337 338 |
# File 'cybertrain/cookie_jar.rb', line 336 def []=(name, value) @jar.(name.to_s, value, CookieJar::SIGNED, @permanent) end |
#delete(name, path: "/") ⇒ String?
Returns the raw (signed) value it had.
344 345 346 |
# File 'cybertrain/cookie_jar.rb', line 344 def delete(name, path: "/") @jar.delete(name, path: path) end |