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 |_k, value| country = Country.new(value) attributes.any? do |attr| Array(country.send(attr)).any? do |attr_value| lookup_value === cached(attr_value) { parse_value(attr_value) } end end end end