Method: Addressable::URI#basename

Defined in:
lib/vendor/addressable/lib/addressable/uri.rb

#basenameString

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

Returns:

  • (String)

    The path’s basename.



1157
1158
1159
1160
# File 'lib/vendor/addressable/lib/addressable/uri.rb', line 1157

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