Skip to content

Commit

Permalink
cleaned up libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
vkhatri committed Nov 8, 2014
1 parent 3e13919 commit b310e8f
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions libraries/ddnsupdate.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,9 @@ def self.dig(type, resource, server = nil)
case type.upcase
when 'A'
Resolv::DNS.new(o).getaddresses(resource).map(&:to_s)
# Resolv::DNS.new(o).getaddresses(resource).map { |i| i.to_s }
# Resolv::DNS.new.getresources(resource, Resolv::DNS::Resource::IN::A).map {|i| i.address.to_s}
when 'PTR'
Resolv::DNS.new(o).getnames(resource).map(&:to_s)
# Resolv::DNS.new(o).getnames(resource).map { |i| i.to_s }
when 'CNAME'
Resolv::DNS.new(o).getresources(resource, Resolv::DNS::Resource::IN::CNAME).map { |i| i.name.to_s }
when 'MX'
Expand All @@ -49,10 +47,8 @@ def self.dig(type, resource, server = nil)
case type.upcase
when 'A'
Resolv.getaddresses(resource).map(&:to_s)
# Resolv.getaddresses(resource).map { |i| i.to_s }
when 'PTR'
Resolv.getnames(resource).map(&:to_s)
# Resolv.getnames(resource).map { |i| i.to_s }
when 'CNAME'
Resolv::DNS.new.getresources(resource, Resolv::DNS::Resource::IN::CNAME).map { |i| i.name.to_s }
when 'MX'
Expand Down

0 comments on commit b310e8f

Please sign in to comment.