Class: Pathname
- Inherits:
-
Object
- Object
- Pathname
- Defined in:
- lib/duvet/core_ext.rb
Instance Method Summary collapse
-
#extension ⇒ String
Gets just the extension of the pathname.
-
#file_name ⇒ String
Gets the name of the file without the extension.
Instance Method Details
#extension ⇒ String
Gets just the extension of the pathname
6 7 8 |
# File 'lib/duvet/core_ext.rb', line 6 def extension self.extname[1..-1] end |
#file_name ⇒ String
Gets the name of the file without the extension
13 14 15 |
# File 'lib/duvet/core_ext.rb', line 13 def file_name self.basename.to_s[0...-(self.extension.size+1)] end |