Method: FFaker::Address#country
- Defined in:
- lib/ffaker/address.rb
#country(given_code = nil) ⇒ Object
93 94 95 96 97 98 99 100 |
# File 'lib/ffaker/address.rb', line 93 def country(given_code = nil) country_index = COUNTRY_CODE.index(given_code) if given_code && country_index COUNTRY[country_index] else fetch_sample(COUNTRY) end end |