# File lib/countries/country/class_methods.rb, line 76 def find_all_by(attribute, val) attributes, lookup_value = parse_attributes(attribute, val) ISO3166::Data.cache.select do |_, v| country = Country.new(v) attributes.any? do |attr| Array(country.send(attr)).any? { |n| lookup_value === parse_value(n) } end end end