module ISO3166::CountryFinderMethods
def find_all_by(attribute, val)
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? do |n| lookup_value === cached(n) { parse_value(n) } end end end end