るりまサーチ

最速Rubyリファレンスマニュアル検索!
39件ヒット [1-39件を表示] (0.074秒)

別のキーワード

  1. _builtin include?
  2. socket mcast_include
  3. gdbm include?
  4. sdbm include?
  5. dbm include?

ライブラリ

クラス

モジュール

検索結果

Enumerable#each_entry -> Enumerator (18221.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 が返されます。

@se...

Enumerable#each_entry {|obj| block} -> self (18221.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 が返されます。

@se...

Pathname#each_entry -> Enumerator (18221.0)

Dir.foreach(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.fore...

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

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

...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.for...
...した場合は 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.fore...