Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →

instance method

GetoptLong#get_option

get_option

Alias of #get

Returns the next option as a 2-element array containing:

  • The option name (the name itself, not an alias).

  • The option value.

Returns nil if there are no more options.