Method: Filepath#==
- Defined in:
- lib/filepath/filepath.rb
#==(other) ⇒ boolean
Note:
this method compares the normalized versions of the paths
Checks whether two paths are equivalent.
Two paths are equivalent when they have the same normalized segments.
A relative and an absolute path will always be considered different. To compare relative paths to absolute path, expand first the relative path using Filepath::FilesystemInfo#absolute_path or Filepath::FilesystemInfo#real_path.
648 649 650 |
# File 'lib/filepath/filepath.rb', line 648 def ==(other) return self.normalized_segments == other.as_path.normalized_segments end |