Class: MountableFileServer::URI

Inherits:
String
  • Object
show all
Defined in:
lib/mountable_file_server/uri.rb

Instance Method Summary collapse

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

#filenameObject



14
15
16
# File 'lib/mountable_file_server/uri.rb', line 14

def filename
  Pathname(::URI.parse(self).path).basename.to_s
end

#uidObject



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

def uid
  UniqueIdentifier.new filename
end