This module allows Ruby programs to interface with the GNU adns library (gnu.org/software/adns/). You must have the GNU adns library version >= 1.2 installed in order to build this module.
gem install adns-ruby
require 'adns' require 'pp' adns= ADNS::State.new domain= "rubygems.org" query_list= Hash.new query_list[adns.submit(domain, ADNS::RR::MX)]= 'MX' query_list[adns.submit(domain, ADNS::RR::A)]= 'A' query_list[adns.submit(domain, ADNS::RR::NS)]= 'NS' query_list[adns.submit(domain, ADNS::RR::SOA)]= 'SOA' for (query, rr) in query_list puts rr.center(20, "*") pp query.wait end
For more examples, you can browse the examples/ directory in the adns-ruby gem installation path or you can visit the github repository (github.com/tuladhar/adns-ruby) and browse the examples/ directory.
git clone https://github.com/tuladhar/adns-ruby