Sha256: 8f4e36836f5b827a6e9bd97b2fffd6cebc798d6d480449962b3428f2e3dd255b
Contents?: true
Size: 325 Bytes
Versions: 7
Compression:
Stored size: 325 Bytes
Contents
%w{ uri }.each { |m| require m } # Extra methods added to URI class. class URI::Generic # Return the domain. def domain if (host and (d = host[/[a-z\d-]+\.[a-z]{2,}(\.[a-z]{2})?$/])) d.downcase end end # Return the path and query string. def path_query; path + (query ? "?#{query}" : ''); end end
Version data entries
7 entries across 7 versions & 1 rubygems