lib/extended_classes.rb
# returns list of IPV6 addresses, or nil
# (there should only be one IPV6 address)
returns list of IPV6 addresses, or nil
(there should only be one IPV6 address)
returns list of IPV6 addresses or nil ( there should only be one IPV6 address )
def dig_aaaa
    Resolv::DNS.open do |dns|
      txts = dns.getresources(self,Resolv::DNS::Resource::IN::AAAA).collect { |r| r.address.to_s.downcase }
      if txts.empty? then nil else txts[0] end
    end
  end
def dig_aaaa Resolv :: DNS . open do | dns | txts = dns . getresources ( self , Resolv :: DNS :: Resource :: IN :: AAAA ) . collect { | r | r . address . to_s . downcase } if txts . empty? then nil else txts [ 0 ] end end end
returns list of IPV6 addresses, or nil
(there should only be one IPV6 address)
returns list of IPV6 addresses or nil ( there should only be one IPV6 address )