Method: Addressable::URI#extname

Defined in:
lib/addressable/uri.rb

#extnameString

The extname, if any, of the file in the path component. Empty string if there is no extension.

Returns:

  • (String)

    The path’s extname.



1598
1599
1600
1601
# File 'lib/addressable/uri.rb', line 1598

def extname
  return nil unless self.path
  return File.extname(self.basename)
end