Method: Pathname#common_path
- Defined in:
- lib/pleasant_path/pathname.rb
#common_path(other) ⇒ Pathname
Returns the longest path that the Pathname and other
have in common.
77 78 79 |
# File 'lib/pleasant_path/pathname.rb', line 77 def common_path(other) File.common_path([self.to_s, other.to_s]).to_pathname end |