■ [ruby] Ruby用のコマンドラインパーサSlop https://github.com/injekt/slop 標準添付のoptparseに似てるけど、オプション項目の置き場所も兼ねてるところが便利そう。 READMEより: # parse assumes ARGV, otherwise you can pass it your own Array opts = Slop.parse do on :v, :verbose, 'Enable verbose mode' # boolean value on :n, :name, 'Your name', true # compulsory argument on :s, :sex, 'Your sex', :optional => false # the same thing on :a, :age, 'Your age', :op
![Route 477(2011-04-08)](https://cdn-ak-scissors.b.st-hatena.com/image/square/b0dd2a08b2c0fff30d70543ed7fa340ebfeb5697/height=288;version=1;width=512/https%3A%2F%2Froute477.net%2Fd%2Fassets%2Fogimage.png)