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#complete

complete(typ, opt, icase = false, *pat)

Completes shortened long style option switch and returns pair of canonical switch and switch descriptor OptionParser::Switch.

typ

Searching table.

opt

Searching key.

icase

Search case insensitive if true.

pat

Optional pattern for completion.