Method: Path.relative
- Defined in:
- lib/path.rb
.relative(path, from = nil) ⇒ Object
Path relative to the directory of this file.
25 26 27 28 |
# File 'lib/path.rb', line 25 def relative(path, from = nil) from ||= caller # this can not be moved as a default argument, JRuby optimizes it new(path). dir(from) end |