4件ヒット
[1-4件を表示]
(0.110秒)
検索結果
先頭4件
- OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () - OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () - OptionParser
:: Arguable # getopts(short _ opt , *long _ opt) -> Hash - OptionParser
# to _ a -> [String]
-
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) -> () (37690.0) -
サマリを指定された to へと加えていきます。
...大幅を整数で指定します。
@param indent サマリのインデントを文字列で指定します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summarize
#... -
OptionParser
# summarize(to = [] , width = self . summary _ width , max = width - 1 , indent= self . summary _ indent) {|line| . . . } -> () (37690.0) -
サマリを指定された to へと加えていきます。
...大幅を整数で指定します。
@param indent サマリのインデントを文字列で指定します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.summarize
#... -
OptionParser
:: Arguable # getopts(short _ opt , *long _ opt) -> Hash (36610.0) -
指定された short_opt や long_opt に応じて自身をパースし、結果を Hash として返します。
...実際は OptionParser::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"=>... -
OptionParser
# to _ a -> [String] (27667.0) -
サマリの各行を要素とした配列を返します。
...サマリの各行を要素とした配列を返します。
//emlist[例][ruby]{
require "optparse"
opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end
opts.to_a # => ["Usage: test [options]", " -i, --init\n", " -...