module Asciidoctor::Helpers

def extname? path

Returns true if the path has a file extension, false otherwise

path - The path String to check; expects a posix path

Public: Returns whether this path has a file extension.
def extname? path
  (last_dot_idx = path.rindex '.') && !(path.index '/', last_dot_idx)
end