Class: Faker::WorldCup
Constant Summary
Constants inherited from Base
Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters
Class Method Summary collapse
-
.city ⇒ String
Produces a city name hosting the World Cup match.
-
.group(group: 'group_A') ⇒ String
Produces a random national team name from a group.
-
.roster(country: 'Egypt', type: 'coach') ⇒ String
Produces a random name from national team roster.
-
.stadium ⇒ String
Produces the name of a stadium that has hosted a World Cup match.
-
.team ⇒ String
Produces a national team name.
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
.city ⇒ String
Produces a city name hosting the World Cup match.
28 29 30 |
# File 'lib/faker/default/world_cup.rb', line 28 def city fetch('world_cup.cities') end |
.group(group: 'group_A') ⇒ String
Produces a random national team name from a group.
56 57 58 |
# File 'lib/faker/default/world_cup.rb', line 56 def group(group: 'group_A') fetch("world_cup.groups.#{group}") end |
.roster(country: 'Egypt', type: 'coach') ⇒ String
Produces a random name from national team roster.
72 73 74 |
# File 'lib/faker/default/world_cup.rb', line 72 def roster(country: 'Egypt', type: 'coach') fetch("world_cup.rosters.#{country}.#{type}") end |
.stadium ⇒ String
Produces the name of a stadium that has hosted a World Cup match.
41 42 43 |
# File 'lib/faker/default/world_cup.rb', line 41 def stadium fetch('world_cup.stadiums') end |
.team ⇒ String
Produces a national team name.
15 16 17 |
# File 'lib/faker/default/world_cup.rb', line 15 def team fetch('world_cup.teams') end |