Sha256: a58cc675e817a24703d13a40aa216821f8bc85b2bb0adbb8b6910533a2accb2f
Contents?: true
Size: 451 Bytes
Versions: 2
Compression:
Stored size: 451 Bytes
Contents
module Whois::Domain @@tlds = {} def self.tlds @@tlds end def self.new(domain_name) tld = domain_name.match(/.*\.([^\.]+)$/)[1].to_sym class_name = @@tlds.find{|c, tlds_ary| tlds_ary.include?(tld)}[0] const_get(class_name).new(domain_name) end end require 'whois/domain/base.rb' Dir.new(File.dirname(__FILE__) + '/domain').each do |file| require('whois/domain/' + File.basename(file)) if File.extname(file) == ".rb" end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
jm81-whois-0.7.0 | lib/whois/domain.rb |
jm81-whois-0.6.0 | lib/whois/domain.rb |