Method: Addressable::URI#basename

Defined in:
lib/addressable/uri.rb

#basenameString

The basename, if any, of the file in the path component.

Returns:

  • (String)

    The path’s basename.



1588
1589
1590
1591
# File 'lib/addressable/uri.rb', line 1588

def basename
  # Path cannot be nil
  return File.basename(self.path).sub(/;[^\/]*$/, EMPTY_STR)
end