new

Cookie.new(name_string,*value)Cookie.new(options_hash) Class Public methods Create a new CGI::Cookie object. name_string The name of the cookie; in this form, there is no domain or expiration. The path is gleaned from the SCRIPT_NAME environment variable, and secure is false. *value value or list of values of the cookie options_hash A Hash of options to initialize this Cookie. Possible options are: name the name of the cookie. Required. value the cookie's value o

parse

parse(raw_cookie) Class Public methods Parse a raw cookie string into a hash of cookie-name=>Cookie pairs. cookies = CGI::Cookie::parse("raw_cookie_string") # { "name1" => cookie1, "name2" => cookie2, ... }

secure=

secure=(val) Instance Public methods Set whether the Cookie is a secure cookie or not. val must be a boolean.

to_s

to_s() Instance Public methods Convert the Cookie to its string representation.

value

value() Instance Public methods Returns the value or list of values for this cookie.

value=

value=(val) Instance Public methods Replaces the value of this cookie with a new value or list of values.

a

a(href = "") Instance Public methods Generate an Anchor element as a string. href can either be a string, giving the URL for the HREF attribute, or it can be a hash of the element's attributes. The body of the element is the string returned by the no-argument block passed in. a("http://www.example.com") { "Example" } # => "<A HREF=\"http://www.example.com\">Example</A>" a("HREF" => "http://www.example.com", "TARGET" => "_top") { "Example" } # => "<A

base

base(href = "") Instance Public methods Generate a Document Base URI element as a String. href can either by a string, giving the base URL for the HREF attribute, or it can be a has of the element's attributes. The passed-in no-argument block is ignored. base("http://www.example.com/cgi") # => "<BASE HREF=\"http://www.example.com/cgi\">"

blockquote

blockquote(cite = {}) Instance Public methods Generate a BlockQuote element as a string. cite can either be a string, give the URI for the source of the quoted text, or a hash, giving all attributes of the element, or it can be omitted, in which case the element has no attributes. The body is provided by the passed-in no-argument block blockquote("http://www.example.com/quotes/foo.html") { "Foo!" } #=> "<BLOCKQUOTE CITE=\"http://www.example.com/quotes/foo.html\">Foo!<

caption

caption(align = {}) Instance Public methods Generate a Table Caption element as a string. align can be a string, giving the alignment of the caption (one of top, bottom, left, or right). It can be a hash of all the attributes of the element. Or it can be omitted. The body of the element is provided by the passed-in no-argument block. caption("left") { "Capital Cities" } # => <CAPTION ALIGN=\"left\">Capital Cities</CAPTION>