Class: Addressable::URI
- Inherits:
-
Object
- Object
- Addressable::URI
- Defined in:
- lib/url_canonicalize/core_ext/addressable.rb
Overview
Patch for Addressable's URI class
Class Method Summary collapse
Class Method Details
.canonicalize(uri) ⇒ Object
8 9 10 11 12 |
# File 'lib/url_canonicalize/core_ext/addressable.rb', line 8 def self.canonicalize(uri, **) url = parse(uri).to_s # uri can be anything Addressable::URI can handle canonical_url = URLCanonicalize.canonicalize(url, **) parse(canonical_url) end |