module Merb class Cookies < Mash # :api: private def initialize(constructor = {}) @_options_lookup = Mash.new @_cookie_defaults = { "domain" => Merb::Controller._default_cookie_domain, "path" => '/' } super constructor end # Implicit assignment of cookie key and value. # # ==== Parameters # name<~to_s>:: Name of the cookie. # value<~to_s>:: Value of the cookie. # # ==== Notes # By using this method, a cookie key is marked for being # included in the Set-Cookie response header. # # :api: public def []=(key, value) @_options_lookup[key] ||= {} super end # Explicit assignment of cookie key, value and options # # ==== Parameters # name<~to_s>:: Name of the cookie. # value<~to_s>:: Value of the cookie. # options:: Additional options for the cookie (see below). # # ==== Options (options) # :path:: The path for which this cookie applies. Defaults to "/". # :expires