Method: Faker::Address.country_code

Defined in:
lib/faker/default/address.rb

.country_codeString

Produces an ISO 3166 country code.

Examples:

Faker::Address.country_code #=> "IT"

Returns:

  • (String)

Available since:

  • 1.4.0



260
261
262
# File 'lib/faker/default/address.rb', line 260

def country_code
  fetch('address.country_code')
end