Reputation: 10131
I am using the ruby/fog to query all CNAME records or A records of my AWS Route53 account.
items = zone.records.all!.find { |r| r.type == 'CNAME' or r.type == 'A' }
However, only one records will be returned even I have multiple matched records.
Any idea?
Upvotes: 1
Views: 301
Reputation: 4879
Well, find
only returns 1 record. The first record. Try using select
instead.
Find: http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-find
Select: http://ruby-doc.org/core-2.1.0/Enumerable.html#method-i-select
Upvotes: 1