るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. optparse on
  2. optionparser on
  3. tracer on
  4. thread abort_on_exception=
  5. thread abort_on_exception

ライブラリ

クラス

検索結果

OptionParser#to_a -> [String] (72379.0)

サマリの各行を要素とした配列を返します。

サマリの各行を要素とした配列を返します。

//emlist[例][ruby]{
require "optparse"

opts = OptionParser.new do |opts|
opts.on_head("-i", "--init")
opts.on("-u", "--update")
opts.on_tail("-h", "--help")
end

opts.to_a # => ["Usage: test [options]", " -i, --init\n", " -u, --update\n", " -h, --help\n"]
//}