Class: Whisper::Model::URI
- Inherits:
-
Object
- Object
- Whisper::Model::URI
- Defined in:
- lib/whisper/model/uri.rb
Direct Known Subclasses
Instance Method Summary collapse
- #clear_cache ⇒ Object
-
#initialize(uri) ⇒ URI
constructor
A new instance of URI.
- #to_path ⇒ Object
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_cache ⇒ Object
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_path ⇒ Object
14 15 16 17 |
# File 'lib/whisper/model/uri.rb', line 14 def to_path cache cache_path.to_path end |