Module CGI::QueryExtension
In: lib/cgi.rb

Mixin module. It provides the follow functionality groups:

  1. Access to CGI environment variables as methods. See documentation to the CGI class for a list of these variables.
  2. Access to cookies, including the cookies attribute.
  3. Access to parameters, including the params attribute, and overloading
    to perform parameter value lookup by key.
  4. The initialize_query method, for initialising the above mechanisms, handling multipart forms, and allowing the class to be used in "offline" mode.

Methods

[]   has_key?   include?   key?   keys   multipart?   params=   raw_cookie   raw_cookie2  

External Aliases

path -> local_path

Attributes

cookies  [RW]  Get the cookies as a hash of cookie-name=>Cookie pairs.
params  [R]  Get the parameters as a hash of name=>values pairs, where values is an Array.

Public Instance methods

Get the value for the parameter with a given key.

If the parameter has multiple values, only the first will be retrieved; use params() to get the array of values.

Returns true if a given parameter key exists in the query.

include?(*args)

Alias for has_key?

key?(*args)

Alias for has_key?

Return all parameter keys as an array.

Set all the parameters.

Get the raw cookies as a string.

Get the raw RFC2965 cookies as a string.

[Validate]

ruby-doc.org is a service of James Britt and Neurogami, a Ruby application development company in Phoenix, AZ.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.