Method: Path#base

Defined in:
lib/path/parts.rb

#base(*args) ⇒ Object Also known as: basename

Returns the last component of the path. See File.basename.



15
16
17
# File 'lib/path/parts.rb', line 15

def base(*args)
  Path.new(File.basename(@path, *args))
end