module ISO3166::ConversionMethods

def from_alpha2_to_alpha3(alpha2)

Returns:
  • (String) - ISO 3166 alpha-3 country code.

Parameters:
  • alpha2 (String) -- ISO 3166 alpha-2 country code.
def from_alpha2_to_alpha3(alpha2)
  find_country_by_alpha2(alpha2)&.alpha3
end

def from_alpha3_to_alpha2(alpha3)

Returns:
  • (String) - ISO 3166 alpha-2 country code.

Parameters:
  • alpha3 (String) -- ISO 3166 alpha-3 country code.
def from_alpha3_to_alpha2(alpha3)
  find_country_by_alpha3(alpha3)&.alpha2
end