I’m having a real problem understanding OptionParser – the docs in
pickaxe are rather cryptic, Ruby Way doesn’t even talk about it, and all
the Q&A I can find on the web doesn’t clear it up for me.
I’ve gotten this far:
commands = OptionParser.new
commands.on("-h", “–help”) # more or less, I get the .on stuff
That will dump a display of the commands, but for the life of me, I
can’t figure out how to determine which options were actually submitted.
And if the -e param was supplied, what’s its value is.
I have seen:
options = commands.parse(ARGV)
So, confused by that to start with, then really confused by where the
parsed commands are, and what format they’re in.