Skip to content

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

instance method

GetoptLong#get

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.