Class: Faker::Nation
Constant Summary
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.capital_city ⇒ String
Produces a random capital city.
-
.flag ⇒ String
Produces a random national flag emoji.
-
.language ⇒ String
Produces a random national language.
-
.national_sport ⇒ String
Produces a random national sport.
-
.nationality ⇒ String
Produces a random nationality.
Methods inherited from Base
bothify, disable_enforce_available_locales, fetch, fetch_all, flexible, generate, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, shuffle!, translate, unique, with_locale
Class Method Details
.capital_city ⇒ String
Produces a random capital city.
55 56 57 |
# File 'lib/faker/default/nation.rb', line 55 def capital_city fetch('nation.capital_city') end |
.flag ⇒ String
Produces a random national flag emoji.
29 30 31 |
# File 'lib/faker/default/nation.rb', line 29 def flag sample(translate('faker.nation.flag')).pack('C*').force_encoding('utf-8') end |
.language ⇒ String
Produces a random national language.
42 43 44 |
# File 'lib/faker/default/nation.rb', line 42 def language fetch('nation.language') end |
.national_sport ⇒ String
Produces a random national sport.
68 69 70 |
# File 'lib/faker/default/nation.rb', line 68 def national_sport fetch('team.sport') end |
.nationality ⇒ String
Produces a random nationality.
16 17 18 |
# File 'lib/faker/default/nation.rb', line 16 def nationality fetch('nation.nationality') end |