Method: Path#without_extension

Defined in:
lib/epath/parts.rb

#without_extensionObject Also known as: rm_ext

Removes the last extension of path.

Path('script.rb').without_extension # => #<Path script>
Path('archive.tar.gz').without_extension # => #<Path archive.tar>


56
57
58
# File 'lib/epath/parts.rb', line 56

def without_extension
  Path.new @path[0..-extname.size-1]
end