22件ヒット
[1-22件を表示]
(0.144秒)
検索結果
先頭3件
-
OptionParser
:: Arguable # parse! -> [String] (18209.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] (18202.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] (18202.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"]
//}...