Class Merb::Cookies
In: lib/merb-core/dispatch/cookies.rb
Parent: Mash

Methods

[]=   delete   extract_headers   new   set_cookie  

Public Class methods

Public Instance methods

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

Removes the cookie on the client machine by setting the value to an empty string and setting its expiration date into the past.

Parameters

name<~to_s>:Name of the cookie to delete.
options<Hash>:Additional options to pass to set_cookie.

:api: public

Generate any necessary headers.

Returns

Hash:The headers to set, or an empty array if no cookies are set.

:api: private

Explicit assignment of cookie key, value and options

Parameters

name<~to_s>:Name of the cookie.
value<~to_s>:Value of the cookie.
options<Hash>:Additional options for the cookie (see below).

Options (options)

:path<String>:The path for which this cookie applies. Defaults to "/".
:expires<Time>:Cookie expiry date.
:domain<String>:The domain for which this cookie applies.
:secure<Boolean>:Security flag.
:http_only<Boolean>:HttpOnly cookies

Notes

By using this method, a cookie key is marked for being included in the Set-Cookie response header.

:api: private

[Validate]