method
extname
v1_8_7_330 -
Show latest stable
- Class:
Pathname
extname()public
See File.extname. Returns the file’s extension.
1Note
Includes the dot
Returns the extension including the '.'.
E.g.
Pathname("/path/to/file.rb").extname
#=> ".rb"