extname() public

See File.extname. Returns the file’s extension.

Show source
Register or log in to add new notes.
November 24, 2010
0 thanks

Includes the dot

Returns the extension including the ‘.’.

E.g.

Pathname("/path/to/file.rb").extname
#=> ".rb"