Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

CGI::QueryExtension#[]

[](key)

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.

See also #has_key? #include? also in 3.4 · 3.2 · 3.1 · 3.0