Method: Path#root?
- Defined in:
- lib/path/predicates.rb
#root? ⇒ Boolean
Predicate for root directories. Returns true if the path consists of consecutive slashes.
It doesn’t access the filesystem. So it may return false for some paths which points to roots such as /usr/...
19 20 21 |
# File 'lib/path/predicates.rb', line 19 def root? is_root?(@path) end |