class ActionDispatch::Cookies::AbstractCookieJar
:nodoc:
def [](name)
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
def []=(name, options)
def []=(name, options) if options.is_a?(Hash) options.symbolize_keys! else options = { value: options } end commit(name, options) @parent_jar[name] = options end
def commit(name, options); end
def commit(name, options); end
def cookie_metadata(name, options)
def cookie_metadata(name, options) expiry_options(options).tap do |metadata| metadata[:purpose] = "cookie.#{name}" if request.use_cookies_with_metadata end end
def expiry_options(options)
def expiry_options(options) if options[:expires].respond_to?(:from_now) { expires_in: options[:expires] } else { expires_at: options[:expires] } end end
def initialize(parent_jar)
def initialize(parent_jar) @parent_jar = parent_jar end
def parse(name, data, purpose: nil); data; end
def parse(name, data, purpose: nil); data; end
def request; @parent_jar.request; end
def request; @parent_jar.request; end