Sha256: 5c42f105ea1da31b4cf5ea598ce520be6628159bbe1d0b0d27ad46c784673d9d
Contents?: true
Size: 611 Bytes
Versions: 9
Compression:
Stored size: 611 Bytes
Contents
require 'forwardable' require 'uri' class LimitedURI extend Forwardable def_delegators :@uri, :scheme, :host, :port, :port=, :path, :query, :query=, :to_s def initialize(uri) @uri = uri end def ==(other) to_s == other.to_s end def self.parse(uri) return uri if uri.is_a? LimitedURI return new(uri) if uri.is_a? URI return new(URI.parse(uri)) if uri.is_a? String raise URI::InvalidURIError end end
Version data entries
9 entries across 9 versions & 3 rubygems