るりまサーチ (Ruby 2.3.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.209秒)
トップページ > バージョン:2.3.0[x] > 種類:インスタンスメソッド[x] > クエリ:t[x] > クエリ:-[x] > クエリ:options[x] > クエリ:to_s[x] > クラス:OptionParser[x]

別のキーワード

  1. socket ip_options
  2. syslog options
  3. net/http options
  4. fileutils options_of
  5. fileutils options

ライブラリ

検索結果

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

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