Skip to content

End of Life Ruby 3.1 has reached end of life and gets no more fixes. 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.3 · 3.2 · 3.0