るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.211秒)
トップページ > クエリ:l[x] > クエリ:>[x] > クエリ:e[x] > クエリ:each_entry[x]

別のキーワード

  1. open3 popen2e
  2. socket af_e164
  3. matrix rank_e
  4. open3 capture2e
  5. matrix det_e

ライブラリ

クラス

モジュール

検索結果

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

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

...配列として渡されます。

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

ブロックを省略した場合は Enumerator が返されます。

@see Enumerable#slice_before...

Enumerable#each_entry -> Enumerator (30308.0)

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

...配列として渡されます。

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

ブロックを省略した場合は Enumerator が返されます。

@see Enumerable#slice_before...

Pathname#each_entry {|pathname| ... } -> nil (24438.0)

Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。

...each(self.to_s) {|f| yield Pathname.new(f) } と同じです。


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

Pathname("/usr/local").each_entry {|f| p f }

# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>...
...//}

@see Dir.foreach...
...each(self.to_s) {|f| yield Pathname.new(f) } と同じです。

ブロックを省略した場合は Enumerator を返します。

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

Pathname("/usr/local").each_entry {|f| p f }

# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>...
...# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}

@see Dir.foreach...