Method: Path#join
- Defined in:
- lib/path/implementation.rb
#join(*paths) ⇒ Object
Joins paths.
path0.join(path1, ..., pathN)
# is the same as
path0 / path1 / ... / pathN
92 93 94 95 96 97 98 99 |
# File 'lib/path/implementation.rb', line 92 def join(*paths) result = nil paths.reverse_each { |path| result = Path.new(path) / result return result if result.absolute? } self / result end |