ascend()
Instance Public methods
Iterates over and yields a new Pathname object for each element in the given path in ascending order.
1 2 3 4 5 6 7 8 9 10 11 12 | Pathname. 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:/> Pathname. 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> |
It doesn't access the filesystem.
Please login to continue.