るりまサーチ

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

別のキーワード

  1. _builtin children
  2. pathname children
  3. dir children
  4. node children
  5. psych children

ライブラリ

クラス

検索結果

Pathname#each_child(with_directory = true) -> Enumerator (24237.0)

self.children(with_directory).each と同じです。

...self.children(with_directory).each と同じです。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

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

Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname...
...al/share>
# => #<Pathname:/usr/local/var>

Pathname("/usr/local").each_child(false) {|f| p f }
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
# => #<Pathname:sbin>
# => #<Pathname:share>
# => #<Pathname:var>
//}

@see Pathname#children...

Pathname#each_child(with_directory = true) {|pathname| ...} -> [Pathname] (24237.0)

self.children(with_directory).each と同じです。

...self.children(with_directory).each と同じです。

@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。

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

Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname...
...al/share>
# => #<Pathname:/usr/local/var>

Pathname("/usr/local").each_child(false) {|f| p f }
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
# => #<Pathname:sbin>
# => #<Pathname:share>
# => #<Pathname:var>
//}

@see Pathname#children...