Class: Configuration::Path::RenderedPath
- Defined in:
- lib/httpimagestore/configuration/path.rb
Instance Method Summary collapse
Methods inherited from String
Instance Method Details
#to_uri ⇒ Object
26 27 28 29 30 |
# File 'lib/httpimagestore/configuration/path.rb', line 26 def to_uri uri_path = self.gsub(/^\/?([a-zA-Z])[\|:][\\\/]/){"/#{$1.downcase}:/"} # fix windows backslash uri_path = Addressable::URI::SLASH + uri_path if uri_path[0] != Addressable::URI::SLASH # make absolute Addressable::URI.new(path: uri_path).normalize end |