See File.basename. Returns the last component of the path.
File.basename
765 766 767
# File 'lib/fakefs/pathname.rb', line 765 def basename(*args) self.class.new(File.basename(@path, *args)) end