るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.199秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:a[x] > クエリ:to[x] > クエリ:end[x] > クエリ:descend[x]

別のキーワード

  1. _builtin to_a
  2. matrix to_a
  3. to_a
  4. dbm to_a
  5. rexml/document to_a

ライブラリ

クラス

検索結果

Pathname#descend -> Enumerator (27662.0)

self のパス名の親から子供へと辿っていったときの各パス名を新しい Pathname オブジェクトとして生成し、ブロックへの引数として渡して実行しま す。 ブロックを省略した場合は Enumerator を返します。

...
Pathname オブジェクトとして生成し、ブロックへの引数として渡して実行しま
す。
ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
r
equire 'pathname'

Pathname.new('/path/to/some/file.rb').descend {|v| p v}
# => #<Pathname:/>
#...
...#<Pathname:/path>
# #<Pathname:/path/to>
# #<Pathname:/path/to/some>
# #<Pathname:/path/to/some/file.rb>

Pathname.new('path/to/some/file.rb').descend {|v| p v}
# => #<Pathname:path>
# #<Pathname:path/to>
# #<Pathname:path/to/some>
# #<Pathname:path/to/some/file.rb>
//}

ファ...