Sha256: 1b447a0c63a56f2d902be8e8701da55a9255a05a0b1a9b4ef43a16cc04713ff6
Contents?: true
Size: 261 Bytes
Versions: 4
Compression:
Stored size: 261 Bytes
Contents
require "url_format/version" require "url_format/url_format_validator" require "uri" module UrlFormat def self.get_domain(url) host = URI.parse(url).host.downcase host.start_with?('www.') ? host[4..-1] : host rescue URI::InvalidURIError end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
url_format-0.0.8 | lib/url_format.rb |
url_format-0.0.7 | lib/url_format.rb |
url_format-0.0.6 | lib/url_format.rb |
url_format-0.0.5 | lib/url_format.rb |