24件ヒット
[1-24件を表示]
(0.122秒)
クラス
- Enumerator (12)
- OptionParser (12)
検索結果
-
OptionParser
# to _ a -> [String] (18120.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"]
//}... -
Enumerator
# size -> Integer | Float :: INFINITY | nil (107.0) -
self の要素数を返します。
...の場合は Float::INFINITY を返します。
Enumerator.new に Proc オブジェクトを指定していた場合はその
実行結果を返します。呼び出した時に要素数が不明であった場合は nil を返し
ます。
//emlist[例][ruby]{
(1..100).to_a.permutation(4).size #......=> 94109400
loop.size # => Float::INFINITY
(1..100).drop_while.size # => nil
//}
@see Enumerator.new...