るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.053秒)
トップページ > クエリ:ruby[x] > クエリ:string[x] > クラス:OptionParser[x] > クエリ:on[x] > クエリ:help[x] > クエリ:to_s[x]

別のキーワード

  1. optionparser on
  2. optparse on
  3. tracer on
  4. thread abort_on_exception=
  5. thread abort_on_exception

ライブラリ

検索結果

OptionParser#help -> String (21223.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: example.rb [options]
# -v, --[no-]...

OptionParser#to_s -> String (21223.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: example.rb [options]
# -v, --[no-]...