Skip to content

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

instance method

GetoptLong#get

get

Get next option name and its argument, as an Array of two elements.

The option name is always converted to the first (preferred) name given in the original options to GetoptLong.new.

Example: [‘–option’, ‘value’]

Returns nil if the processing is complete (as determined by STATUS_TERMINATED).