るりまサーチ

最速Rubyリファレンスマニュアル検索!
72件ヒット [1-72件を表示] (0.021秒)
トップページ > クエリ:Options[x] > クエリ:banner=[x]

別のキーワード

  1. socket ip_options
  2. optparse options
  3. arguable options
  4. syslog options
  5. fileutils options

ライブラリ

クラス

キーワード

検索結果

OptionParser#banner=(heading) (18136.0)

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

...y]{
require "optparse"

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

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

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

OptionParser#banner -> String (30.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

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

OptionParser#help -> String (30.0)

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

...[例][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: example.rb [options]
# -v, --[no-]verbose...

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

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

...optparse'
opts = OptionParser.new
opts.banner = "Usage: example.rb [options]"

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

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

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

opts.on_tail("-h", "--help", "Show...

OptionParser#to_s -> String (30.0)

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

...[例][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: example.rb [options]
# -v, --[no-]verbose...

絞り込み条件を変える

OptionParser#ver -> String (12.0)

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 = "2019-05-01"

opts.on_tail("--version", "Show...