るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.014秒)

別のキーワード

  1. arguable options
  2. arguable order!
  3. arguable permute!
  4. arguable options=

モジュール

検索結果

OptionParser::Arguable#getopts(short_opt, *long_opt) -> Hash (21110.0)

指定された short_opt や long_opt に応じて自身をパースし、結果を Hash として返します。

...ptionParser::ParseError のサブク
ラスの例外になります。

//emlist[t.rb][ruby]{
require 'optparse'
params = ARGV.getopts("ab:", "foo", "bar:", "bufsize:1024")
p params
//}

# 実行結果
$ ruby t.rb -b 1 --foo --bar xxx -- -a
{"bufsize"=>"1024", "a"...