るりまサーチ

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

別のキーワード

  1. socket ip_options
  2. getoptlong set_options
  3. optparse options
  4. arguable options
  5. fileutils options_of

クラス

検索結果

OptionParser#separator(sep) -> () (18164.0)

サマリにオプションを区切るための文字列 sep を挿入します。 オプションにいくつかの種類がある場合に、サマリがわかりやすくなります。

...//emlist[][ruby]{
require 'optparse'
opts = OptionParser.new
opts.banner = "Usage: example.rb [options]"

opts.separator ""
opts.separator "Specific options:"

opts.on("-r", "--require LIBRARY") do |lib|
options
.library << lib
end

opts.separator ""
opts.separator "Common options:"

opts.on...
..._tail("-h", "--help", "Show this message") do
puts opts
exit
end
//}...