13件ヒット
[1-13件を表示]
(0.035秒)
検索結果
-
Pathname
# each _ entry {|pathname| . . . } -> nil (21208.0) -
Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
...f.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>
//}
@s......| yield Pathname.new(f) } と同じです。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
require "pathname"
Pathname("/usr/local").each_entry {|f| p f }
# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:in......clude>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}
@see Dir.foreach... -
Pathname
# each _ entry -> Enumerator (21108.0) -
Dir.foreach(self.to_s) {|f| yield Pathname.new(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:in......clude>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}
@see Dir.foreach...