るりまサーチ

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

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. t61string new
  4. matrix t
  5. fiddle align_size_t

ライブラリ

クラス

キーワード

検索結果

OptionParser#banner -> String (21220.0)

サマリの最初に表示される文字列を返します。

...します。

@
return サマリの最初に表示される文字列を返します。

//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

p opts.banner # => "Usage: example.rb [options]"
//}...

OptionParser#banner=(heading) (9120.0)

サマリの最初に表示される文字列を指定します。

...指定します。

@
param heading サマリの最初に表示される文字列を指定します。

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

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

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

opts.banner # => "Usage: example.rb [options]"
//}...

OptionParser#separator(sep) -> () (6113.0)

サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。

...す。

@
param sep サマリの区切りを文字列で指定します。

//emlist[][ruby]{
require 'optparse'
opts = OptionParser.new
opts.banner = "Usage: example.rb [options]"

opts.separator ""
opts.separator "Specific options:"

opts.on("-r", "--require LIBRARY") do |lib|
options.libra...
...ry << lib
end

opts.separator ""
opts.separator "Common options:"

opts.on_tail("-h", "--help", "Show this message") do
puts opts
exit
end
//}...