るりまサーチ

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

別のキーワード

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

ライブラリ

キーワード

検索結果

OptionParser#help -> String (25.0)

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

...se"

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 Run verbosely
//}...

OptionParser#to_s -> String (25.0)

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

...se"

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 Run verbosely
//}...

OptionParser#banner -> String (19.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#banner=(heading) (19.0)

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

...list[例][ruby]{
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 [op...