るりまサーチ

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

別のキーワード

  1. time parse
  2. csv parse
  3. parser parse
  4. ripper parse
  5. psych parse_stream

ライブラリ

検索結果

OptionParser#to_s -> String (21109.0)

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

...list[例][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-]verbose...

OptionParser#help -> String (6009.0)

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

...list[例][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-]verbose...