Undefined method `dns_name' for


I’m getting the following error :-

stevbutt$ ./aws-dns.rb
./aws-dns.rb:23:in block in <main>': undefined method dns_name’ for
ns-595.awsdns-10.net.”:String (NoMethodError)
from ./aws-dns.rb:19:in select' from ./aws-dns.rb:19:in

when running this code :-

Grab zone for hosts.company.net

zone = dns_client.zones.get(‘foobar’)
dns_records = zone.records.all!
dns_values = dns_records.collect(&:value).flatten!

#orphans = instances.select do |instance|
orphans = dns_values.select do |instance|
#puts dns_values.methods

TODO: dump instance using to_a (or whatever)

puts “–> " + instance

Any suggestions as to how I can either just ignore the undefined method
(for that result only) and skip over that value, or possibly some other
suggestion? I’m learning Ruby and this code was provided half completed
by a colleague.