るりまサーチ

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

別のキーワード

  1. matrix tr
  2. string tr!
  3. string tr_s!
  4. string tr
  5. string tr_s

ライブラリ

クラス

モジュール

検索結果

OptionParser::Arguable#parse! -> [String] (18208.0)

自身を破壊的にパースし、パースされずに残った引数を文字列の配列として返します。 OptionParser#parse! を参照して下さい。

...自身を破壊的にパースし、パースされずに残った引数を文字列の配列として返します。
OptionParser#parse! を参照して下さい。

@raise OptionParser::ParseError 自身のパースに失敗した場合、発生します。
実際...
...は OptionParser::ParseError のサブク
ラスの例外になります。

//emlist[][ruby]{
require 'optparse'

o = nil
ARGV.options.on('-a'){ o = true }
ARGV.parse!
p o #=> true
//}...

OptionParser#parse!(argv = self.default_argv) -> [String] (18201.0)

与えられた argv をパースします。

...ts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

ARGV # => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse!(ARGV) # => ["test"]
ARGV # => ["test"]
//}...

OptionParser#parse!(argv = self.default_argv, into: nil) -> [String] (18201.0)

与えられた argv をパースします。

...ts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

ARGV # => ["-i", "-u", "-h", "test"]
opts.parse(ARGV) # => ["test"]
ARGV # => ["-i", "-u", "-h", "test"]
opts.parse!(ARGV) # => ["test"]
ARGV # => ["test"]
//}...