るりまサーチ

最速Rubyリファレンスマニュアル検索!
22件ヒット [1-22件を表示] (0.042秒)
トップページ > ライブラリ:ビルトイン[x] > クエリ:class[x] > クエリ:new[x] > クエリ:each_entry[x]

別のキーワード

  1. openssl new
  2. _builtin new
  3. rexml/document new
  4. resolv new
  5. socket new

モジュール

検索結果

Enumerable#each_entry -> Enumerator (18122.0)

ブロックを各要素に一度ずつ適用します。

...値が渡された場合はブロックには配列として渡されます。

//emlist[例][ruby]{
class
Foo
include Enumerable
def each
yield 1
yield 1,2
end
end
Foo.new.each_entry{|o| print o, " -- "}
# => 1 -- [1, 2] --
//}

ブロックを省略した場合は Enumerator が返...

Enumerable#each_entry {|obj| block} -> self (18122.0)

ブロックを各要素に一度ずつ適用します。

...値が渡された場合はブロックには配列として渡されます。

//emlist[例][ruby]{
class
Foo
include Enumerable
def each
yield 1
yield 1,2
end
end
Foo.new.each_entry{|o| print o, " -- "}
# => 1 -- [1, 2] --
//}

ブロックを省略した場合は Enumerator が返...