るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.038秒)
トップページ > バージョン:2.4.0[x] > クエリ:Dir[x] > クエリ:foreach[x] > クラス:Pathname[x]

別のキーワード

  1. dir foreach
  2. dir open
  3. dir chdir
  4. dir each_child
  5. rake original_dir

ライブラリ

検索結果

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

Dir.foreach(self.to_s) {|f| yield Pathname.new(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>
//}

@see...