Method: Path#dir
- Defined in:
- lib/path/parts.rb
#dir ⇒ Object Also known as: dirname
Returns all but the last component of the path.
Don’t chain this when the path is relative:
Path('.').dir # => #<Path .>
Use #parent instead. See File.dirname.
31 32 33 |
# File 'lib/path/parts.rb', line 31 def dir Path.new(File.dirname(@path)) end |