るりまサーチ

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

別のキーワード

  1. irb/help print_usage
  2. command usage
  3. irb print_usage
  4. net/imap usage
  5. buildcommand usage

ライブラリ

クラス

検索結果

OptionParser#to_s -> String (24323.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, --[n...

OptionParser#help -> String (21323.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, --[n...