Class: ActionDispatch::Cookies::PermanentCookieJar
Overview
:nodoc:
Constant Summary
Constant Summary
Constants inherited from CookieJar
Instance Method Summary (collapse)
- - (Object) []=(key, options)
-
- (PermanentCookieJar) initialize(parent_jar, secret)
constructor
A new instance of PermanentCookieJar.
- - (Object) method_missing(method, *arguments, &block)
- - (Object) signed
Methods inherited from CookieJar
#[], build, #delete, #handle_options, #permanent, #write
Methods inherited from Hash
#as_json, #assert_valid_keys, #deep_merge, #deep_merge!, #diff, #encode_json, #except, #except!, #extract!, #extractable_options?, from_xml, #reverse_merge, #reverse_merge!, #slice, #slice!, #stringify_keys, #stringify_keys!, #symbolize_keys, #symbolize_keys!, #to_param, #to_xml, #with_indifferent_access
Constructor Details
- (PermanentCookieJar) initialize(parent_jar, secret)
A new instance of PermanentCookieJar
202 203 204 |
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 202 def initialize(parent_jar, secret) @parent_jar, @secret = parent_jar, secret end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
- (Object) method_missing(method, *arguments, &block)
221 222 223 |
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 221 def method_missing(method, *arguments, &block) @parent_jar.send(method, *arguments, &block) end |
Instance Method Details
- (Object) []=(key, options)
206 207 208 209 210 211 212 213 214 215 |
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 206 def []=(key, ) if .is_a?(Hash) .symbolize_keys! else = { :value => } end [:expires] = 20.years.from_now @parent_jar[key] = end |
- (Object) signed
217 218 219 |
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 217 def signed @signed ||= SignedCookieJar.new(self, @secret) end |