Sha256: 925acf153f53c98de72063abb44c5f88a3b23cccd4b28435198662892162f343
Contents?: true
Size: 400 Bytes
Versions: 19
Compression:
Stored size: 400 Bytes
Contents
# Helper class to perform tasks on URI's class UriHelper # Returns an Addressable::URI with the fragment section removed def self.join_no_fragment(content, link) new_link = Addressable::URI.join(content, link) new_link.fragment=nil new_link end def self.parse(url) begin URI.parse(url) rescue URI::InvalidURIError URI.parse(URI.escape(url)) end end end
Version data entries
19 entries across 19 versions & 1 rubygems