るりまサーチ

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

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. pstore path

ライブラリ

クラス

検索結果

Pathname#descend {|pathname| ... } -> nil (21280.0)

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

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

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

Path
name.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>

Path
name.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>
//}

...

Pathname#descend -> Enumerator (21180.0)

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

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

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

Path
name.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>

Path
name.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>
//}

...