Method: WordTree::Disk::LibraryLocator.id_from_path

Defined in:
lib/wordtree/disk/library_locator.rb

.id_from_path(path) ⇒ Object

Raises:



47
48
49
50
# File 'lib/wordtree/disk/library_locator.rb', line 47

def self.id_from_path(path)
  raise NotPath, "not a path" if path.nil? or !path.is_a?(String)
  File.basename(path).sub(/\.[^\.]+$/, '')
end