るりまサーチ

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

別のキーワード

  1. option linger
  2. option int
  3. option bool
  4. getoptlong get_option
  5. getoptlong each_option

ライブラリ

クラス

キーワード

検索結果

RDoc::Options#option_parser -> OptionParser | nil (18202.0)

コマンドライン引数の解析のための OptionParser オブジェクトを返し ます。

コマンドライン引数の解析のための OptionParser オブジェクトを返し
ます。

OptionParser#reject(klass) -> () (119.0)

OptionParser#accept で登録したクラスとブロックを 自身から削除します。

...parse(option_parser)
option_parser
.on("-t", "--time [TIME]", Time) do |time|
p time.class
end
option_parser
.parse(ARGV)
end

opts = OptionParser.new
opts.accept(Time) do |s,|
begin
Time.parse(s) if s
rescue
raise OptionParser::InvalidArgument, s
end
end

parse(opts) # => Time...
...opts.reject(Time)
parse(opts) # => unsupported argument type: Time (ArgumentError)
//}...

GetoptLong#get -> [String, String] (107.0)

ARGV から、次のオプションの名前と、もしあればその引数の組を取 得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名 (例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。

...biguousOption
* GetoptLong::InvalidOption
* GetoptLong::MissingArgument
* GetoptLong::NeedlessArgument

加えて、静粛 (quiet) フラグが有効になっていない限り、エラーメッ
セージを標準エラー出力に出力します。

例:
optname, optarg = option_parser.get...

GetoptLong#get_option -> [String, String] (107.0)

ARGV から、次のオプションの名前と、もしあればその引数の組を取 得します。メソッドは 2 つの値を返し、1 つ目の値がオプション名 (例: --max-size) で、2 つ目がオプションの引数 (例: 20K) です。

...biguousOption
* GetoptLong::InvalidOption
* GetoptLong::MissingArgument
* GetoptLong::NeedlessArgument

加えて、静粛 (quiet) フラグが有効になっていない限り、エラーメッ
セージを標準エラー出力に出力します。

例:
optname, optarg = option_parser.get...