class ActiveStorage::Filename

def extension_with_delimiter

ActiveStorage::Filename.new(".gitignore").extension_with_delimiter # => ""
ActiveStorage::Filename.new("racecar").extension_with_delimiter # => ""
ActiveStorage::Filename.new("racecar.jpg").extension_with_delimiter # => ".jpg"

beginning) with the dot that precedes it. If the filename has no extension, an empty string is returned.
Returns the extension of the filename (i.e. the substring following the last dot, excluding a dot at the
def extension_with_delimiter
  File.extname @filename
end