Class: MountableFileServer::URI
- Inherits:
-
String
- Object
- String
- MountableFileServer::URI
- Defined in:
- lib/mountable_file_server/uri.rb
Instance Method Summary collapse
- #filename ⇒ Object
-
#initialize(string) ⇒ URI
constructor
A new instance of URI.
- #uid ⇒ Object
Constructor Details
#initialize(string) ⇒ URI
Returns a new instance of URI.
6 7 8 |
# File 'lib/mountable_file_server/uri.rb', line 6 def initialize(string) super.freeze end |
Instance Method Details
#filename ⇒ Object
14 15 16 |
# File 'lib/mountable_file_server/uri.rb', line 14 def filename Pathname(::URI.parse(self).path).basename.to_s end |
#uid ⇒ Object
10 11 12 |
# File 'lib/mountable_file_server/uri.rb', line 10 def uid UniqueIdentifier.new filename end |