method
cookie
ruby latest stable - Class:
CGI
Method deprecated or moved
This method is deprecated or moved on the latest stable version. The last existing version (v1_8_7_330) is shown here.
cookie(options)public
make raw cookie string
# File lib/cgi-lib.rb, line 211
def CGI::cookie(options)
"Set-Cookie: " + options['name'] + '=' + escape(options['value']) +
(options['domain'] ? '; domain=' + options['domain'] : '') +
(options['path'] ? '; path=' + options['path'] : '') +
(options['expires'] ? '; expires=' + rfc1123_date(options['expires']) : '') +
(options['secure'] ? '; secure' : '')
end Related methods
- Instance methods
- header
- out
- read_from_cmdline
- Class methods
- cookie
- error
- escape
- escape
- escapeElement
- escapeHTML
- escapeHTML
- header
- message
- new
- new
- parse
- pretty
- rfc1123_date
- rfc1123_date
- tag
- unescape
- unescape
- unescapeElement
- unescapeHTML
- Private methods
-
env_table -
stdinput -
stdoutput