22件ヒット
[1-22件を表示]
(0.151秒)
ライブラリ
- pathname (22)
キーワード
-
each
_ entry (11) - find (11)
検索結果
先頭3件
-
Pathname
# each _ entry {|pathname| . . . } -> nil (118.0) -
Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。
...ach(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>......ach(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... -
Pathname
# find {|pathname| . . . } -> nil (108.0) -
self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。
...self 配下のすべてのファイルやディレクトリを
一つずつ引数 pathname に渡してブロックを実行します。
require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}
と同じです。
ブロックを省略した場合は Enumerator を返します。
@see... -
Pathname
# find(ignore _ error: true) {|pathname| . . . } -> nil (108.0) -
self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。
...self 配下のすべてのファイルやディレクトリを
一つずつ引数 pathname に渡してブロックを実行します。
require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}
と同じです。
ブロックを省略した場合は Enumerator を返します。
@para...