るりまサーチ

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

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. etc cs_path

ライブラリ

クラス

検索結果

Pathname#ascend {|pathname| ... } -> nil (21274.0)

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

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

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

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

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

ファイル...

Pathname#ascend -> Enumerator (21174.0)

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

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

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

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

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

ファイル...