るりまサーチ

最速Rubyリファレンスマニュアル検索!
24件ヒット [1-24件を表示] (0.091秒)
トップページ > クエリ:Ruby[x] > クエリ:ruby[x] > 種類:インスタンスメソッド[x] > クエリ:self[x] > クエリ:i[x] > クラス:Enumerator[x]

別のキーワード

  1. fiddle ruby_free
  2. rbconfig ruby
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

Enumerator#rewind -> self (6221.0)

列挙状態を巻き戻します。

...初まで巻き戻します。 self を返します。

内包するオブジェクトが rewind メソッドを持つとき(respond_to?(:rewind) に
真を返すとき) は、その rewind メソッドを呼び出します。

@see Enumerator#next

//emlist[例][ruby]{
str = "xyz"
enum = str.each_b...
...yte

p enum.next # => 120
p enum.next # => 121
enum.rewind
p enum.next # => 120
//}...

Enumerator#size -> Integer | Float::INFINITY | nil (6130.0)

self の要素数を返します。

...
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...