るりまサーチ

最速Rubyリファレンスマニュアル検索!
600件ヒット [501-600件を表示] (0.036秒)
トップページ > クエリ:Ruby[x] > クエリ:parser[x] > 種類:インスタンスメソッド[x] > クラス:OptionParser[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

<< < ... 4 5 6 >>

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

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

...

@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.summary_indent...

OptionParser#summary_width -> Integer (3008.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_width...

絞り込み条件を変える

OptionParser#summary_width=(width) (3008.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_widt...

OptionParser#to_a -> [String] (3008.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", " -...

OptionParser#to_s -> String (3008.0)

サマリの文字列を返します。

...サマリの文字列を返します。

//emlist[例][ruby]{
require "optparse"

options = {}
opts = OptionParser.new do |opts|
opts.banner = "Usage: example.rb [options]"

opts.on("-v", "--[no-]verbose", "Run verbosely") do |v|
options[:verbose] = v
end
end

puts opts.help

# => Usage:...

OptionParser#ver -> String (3008.0)

program_name、version と release から生成したバージョンを表す文字列を返します。

...program_name、version と release から生成したバージョンを表す文字列を返します。

//emlist[例][ruby]{
require "optparse"

OptionParser
.new do |opts|
opts.banner = "Usage: example.rb [options]"
opts.program_name = "Optparse Example"
opts.version = [0, 1]
opts.release...
<< < ... 4 5 6 >>