class Faker::WorldCup
Public Class Methods
Source
# File lib/faker/default/world_cup.rb, line 28 def city fetch('world_cup.cities') end
Produces a city name hosting the World Cup match.
@return [String]
@example
Faker::WorldCup.city #=> "Moscow"
@faker.version 2.13.0
Source
# File lib/faker/default/world_cup.rb, line 56 def group(group: 'group_A') fetch("world_cup.groups.#{group}") end
Produces a random national team name from a group.
@return [String]
@example
Faker::WorldCup.group(group: 'group_B') #=> "Spain"
@example
Faker::WorldCup.group #=> "Russia"
@faker.version 2.13.0
Source
# File lib/faker/default/world_cup.rb, line 72 def roster(country: 'Egypt', type: 'coach') fetch("world_cup.rosters.#{country}.#{type}") end
Produces a random name from national team roster.
@return [String]
@example
Faker::WorldCup.roster #=> "Hector Cuper"
@example
Faker::WorldCup.roster(country: 'Spain', type: 'forwards') #=> "Diego Costa"
@faker.version 2.13.0
Source
# File lib/faker/default/world_cup.rb, line 41 def stadium fetch('world_cup.stadiums') end
Produces the name of a stadium that has hosted a World Cup match.
@return [String]
@example
Faker::WorldCup.stadium #=> "Rostov Arena"
@faker.version 2.13.0
Source
# File lib/faker/default/world_cup.rb, line 15 def team fetch('world_cup.teams') end
Produces a national team name.
@return [String]
@example
Faker::WorldCup.team #=> "Iran"
@faker.version 1.9.0