optparse-simple
A partial pre-implementation of OptionParser, in particular that actual parsing part:
opts = OptionParser.new do |opts|
opts.in('-f', '--foo'){ ... }
end
opts.parse! args
I really love optparse but:
-
I don’t care about separators / banners / etc, I use other gems/libraries for that stuff
-
optparse is a PITA to extend and the source code is 1,791 lines long!
This is a re-implementation of the part of optparse that actually parses.
This is not trying to be a whole framework for creating CLI applications. There are already numerous great tools out there. Unfortunately, many of them re-implement OptionParser, themselves, because there’s no library out there (that I know of) that just does the parsing part.
Our libraries need to be more UNIX-y! “Write programs that do one thing and do it well.”
install
NOT YET COMPLETE