Class: Whisper::Model::URI

Inherits:
Object
  • Object
show all
Defined in:
lib/whisper/model/uri.rb

Direct Known Subclasses

ZipURI

Instance Method Summary collapse

Constructor Details

#initialize(uri) ⇒ URI

Returns a new instance of URI.



10
11
12
# File 'lib/whisper/model/uri.rb', line 10

def initialize(uri)
  @uri = URI(uri)
end

Instance Method Details

#clear_cacheObject



19
20
21
22
# File 'lib/whisper/model/uri.rb', line 19

def clear_cache
  path = cache_path
  path.delete if path.exist?
end

#to_pathObject



14
15
16
17
# File 'lib/whisper/model/uri.rb', line 14

def to_path
  cache
  cache_path.to_path
end