optparse

http://www.ruby-lang.org/ja/man/index.cgi?cmd=view;name=OptionParser
標準でライブラリがあった…orz