Cookie backend used by the middleware {Rack::MonetaCookies} @api public
(see Proxy#clear)
# File lib/moneta/adapters/cookie.rb, line 29 def clear(options = {}) @backend.each_key { |key| @cookies[key] = nil } super self end
(see Proxy#delete)
# File lib/moneta/adapters/cookie.rb, line 23 def delete(key, options = {}) @cookies[key] = nil super end
Reset the cookie store This method is used by the middleware.
# File lib/moneta/adapters/cookie.rb, line 37 def reset(cookies) @cookies, @backend = {}, cookies end
(see Proxy#store)
# File lib/moneta/adapters/cookie.rb, line 14 def store(key, value, options = {}) cookie = @options.merge(options) cookie[:value] = value cookie[:expires] += Time.now.to_i if cookie[:expires] @cookies[key] = cookie super end
Generated with the Darkfish Rdoc Generator 2.