るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.107秒)
トップページ > クエリ:ruby[x] > クエリ:string[x] > クラス:OptionParser[x] > クエリ:on[x] > クエリ:help[x] > クエリ:to_a[x]

別のキーワード

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

ライブラリ

検索結果

OptionParser#to_a -> [String] (21245.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"]
//}...