るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
6件ヒット [1-6件を表示] (0.050秒)
トップページ > クエリ:indent[x] > クラス:OptionParser[x] > バージョン:3.2[x]

別のキーワード

  1. prettyprint indent
  2. json indent
  3. json indent=
  4. state indent
  5. state indent=

ライブラリ

キーワード

検索結果

OptionParser#summary_indent=(indent) (18682.0)

サマリを表示する時のインデントを文字列で指定します。

...dent サマリを表示する時に使われるインデントを文字列で指定します。

//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 # =>...

OptionParser#summary_indent -> String (18361.0)

サマリを表示する時のインデントを文字列で返します。

...ます。

@return サマリを表示する時のインデントを文字列で返します。

//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 # => "...

OptionParser#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) -> () (634.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
# => [" -i, --in...

OptionParser#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) {|line| ... } -> () (634.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
# => [" -i, --in...

OptionParser.new(banner = nil, width = 32, indent = ' ' * 4) -> OptionParser (328.0)

OptionParser オブジェクトを生成して返します。

...
OptionParser
オブジェクトを生成して返します。

ブロックが与えられた場合、生成した OptionParser オブジェクトを引数としてブロックを評
価します。つまり、以下のような書き方が可能です。

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

絞り込み条件を変える

OptionParser.new(banner = nil, width = 32, indent = ' ' * 4) {|opt| ...} -> OptionParser (328.0)

OptionParser オブジェクトを生成して返します。

...
OptionParser
オブジェクトを生成して返します。

ブロックが与えられた場合、生成した OptionParser オブジェクトを引数としてブロックを評
価します。つまり、以下のような書き方が可能です。

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