るりまサーチ

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

別のキーワード

  1. optparse summary_width
  2. optparse summary_width=
  3. optionparser summary_width
  4. optionparser summary_width=
  5. optparse summary_indent=

ライブラリ

クラス

キーワード

検索結果

OptionParser#summary_width -> Integer (21120.0)

サマリを表示するときの幅を整数で返します。

..."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.summary_width = 8
opts.summary_width...
...# =>8
opts.summarize
# => [" -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}...

OptionParser#summary_width=(width) (9120.0)

サマリを表示するときの幅を整数で指定します。

...す。

@param width サマリを表示するときの幅を整数で指定します。

//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.summa...
...rize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summary_width = 8 # => 8
opts.summary_width # => 8
opts.summarize
# => [" -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}...

OptionParser#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) -> () (3103.0)

サマリを指定された to へと加えていきます。

...ません。

@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。

@param width サマリの幅を整数で指定します。

@param max サマリの最大幅を整数で指定します。

@param indent サ...
...equire "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8, " ")
# => ["description\n",...
..." -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}...

OptionParser#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) {|line| ... } -> () (3103.0)

サマリを指定された to へと加えていきます。

...ません。

@param to サマリを出力するオブジェクトを指定します。to には << メソッドが定義されいる必要があります。

@param width サマリの幅を整数で指定します。

@param max サマリの最大幅を整数で指定します。

@param indent サ...
...equire "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

opts.summarize
# => [" -i, --init\n", " -u, --update\n", " -h, --help\n"]
opts.summarize(["description\n"], 10, 8, " ")
# => ["description\n",...
..." -i\n", " --init\n", " -u\n", " --update\n", " -h\n", " --help\n"]
//}...