るりまサーチ (Ruby 2.1.0)

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

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

ライブラリ

キーワード

検索結果

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

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

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

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

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

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

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

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

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

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

OptionParser#summary_indent=(indent) (18340.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#summarize(to = [], width = self.summary_width, max = width - 1, indent= self.summary_indent) -> () (328.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| ... } -> () (328.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#summary_indent -> String (40.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 # => "...