168件ヒット
[101-168件を表示]
(0.074秒)
ライブラリ
- optparse (168)
クラス
- OptionParser (168)
キーワード
-
on
_ head (12) - parse (24)
- parse! (12)
- separator (12)
- summarize (24)
-
summary
_ indent (12) -
summary
_ indent= (12) -
summary
_ width (12) -
summary
_ width= (12) -
to
_ a (12) - ver (12)
検索結果
先頭5件
-
OptionParser
# summary _ indent -> String (7.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.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
op... -
OptionParser
# summary _ indent=(indent) (7.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.summary_indent # => " "
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
op... -
OptionParser
# summary _ width -> Integer (7.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.summary_width # => 32
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summar... -
OptionParser
# summary _ width=(width) (7.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.summary_width # => 32
opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summar... -
OptionParser
# to _ a -> [String] (7.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", " -u, --update\n", " -h, --help\n"]
//}... -
OptionParser
# ver -> String (7.0) -
program_name、version と release から生成したバージョンを表す文字列を返します。
...|opts|
opts.banner = "Usage: example.rb [options]"
opts.program_name = "Optparse Example"
opts.version = [0, 1]
opts.release = "2019-05-01"
opts.on_tail("--version", "Show version") do
puts opts.ver # => "Optparse Example 0.1 (2019-05-01)"
exit
end
opts.parse!(ARGV)
end
//}...