module Merb # Cookies are read and written through Merb::Controller#cookies. The cookies # you read are those received in request along with those that have been set # during the current request. The cookies you write will be sent out with the # response. Cookies are read by value (so you won't get the cookie object # itself back -- just the value it holds). class Cookies # ==== Parameters # request_cookies:: Initial cookie store. # headers:: The response headers. def initialize(request_cookies, headers) @_cookies = request_cookies @_headers = headers end # ==== Parameters # name<~to_s>:: Name of the cookie. # # ==== Returns # String:: Value of the cookie. def [](name) @_cookies[name] end # ==== Parameters # name<~to_s>:: Name of the cookie. # options:: Options for the cookie being set (see below). # # ==== Options (options) # :value<~to_s>:: Value of the cookie # :path:: The path for which this cookie applies. Defaults to "/". # :expires