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

OptionParser::List#search

search(id, key) { |val| ... }

Searches key in id list. The result is returned or yielded if a block is given. If it isn’t found, nil is returned.

See also #reject #summarize #prepend #update also in 3.3 · 3.2 · 3.1