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

notwice(obj, prv, msg)

Checks if an argument is given twice, in which case an ArgumentError is raised. Called from OptionParser#switch only.

obj

New argument.

prv

Previously specified argument.

msg

Exception message.