Method: ISO3166::CountrySubdivisionMethods#humanized_subdivision_types

Defined in:
lib/countries/country/country_subdivision_methods.rb

#humanized_subdivision_typesArray<String>

:reek:DuplicateMethodCall

Returns:

  • (Array<String>)

    the list of humanized subdivision types for this country. Uses ActiveSupport’s #humanize if available



48
49
50
51
52
53
54
# File 'lib/countries/country/country_subdivision_methods.rb', line 48

def humanized_subdivision_types
  if String.instance_methods.include?(:humanize)
    subdivisions.map { |_k, value| value['type'].humanize.freeze }.uniq
  else
    subdivisions.map { |_k, value| humanize_string(value['type']) }.uniq
  end
end