Sha256: 7e27c5b1eaa76db66997b36db4a57b58c6ce981b0cf15d136d89c805587d745c
Contents?: true
Size: 260 Bytes
Versions: 1
Compression:
Stored size: 260 Bytes
Contents
class EmailDomainValidator::Core def valid?(domain) Resolv::DNS.open do |dns| return dns.getresources(domain, Resolv::DNS::Resource::IN::MX).size > 0 || dns.getresources(domain, Resolv::DNS::Resource::IN::A).size > 0 end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
email_domain_validator-0.0.1 | lib/email_domain_validator/core.rb |