There's a similar question with an answer that may help you: "How do you specify a required switch (not argument) with Ruby OptionParser?"
In short: there doesn't seem to be a way to make an option required (they are called options after all).
There is an OptionParser::MissingArgument
exception that you could raise rather than the ArgumentError
you're currently throwing.