るりまサーチ (Ruby 3.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.073秒)
トップページ > クエリ:l[x] > クエリ:usage[x] > バージョン:3.0[x] > クエリ:to_s[x]

別のキーワード

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

ライブラリ

クラス

検索結果

OptionParser#to_s -> String (54340.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...

OptionParser#help -> String (18340.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...