class Faker::WorldCup

Public Class Methods

city() click to toggle source

Produces a city name hosting the World Cup match.

@return [String]

@example

Faker::WorldCup.city #=> "Moscow"

@faker.version next

# File lib/faker/default/world_cup.rb, line 28
def city
  fetch('world_cup.cities')
end
group(legacy_group = NOT_GIVEN, group: 'group_A') click to toggle source

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 next

# File lib/faker/default/world_cup.rb, line 56
def group(legacy_group = NOT_GIVEN, group: 'group_A')
  warn_for_deprecated_arguments do |keywords|
    keywords << :group if legacy_group != NOT_GIVEN
  end

  fetch("world_cup.groups.#{group}")
end
roster(legacy_country = NOT_GIVEN, legacy_type = NOT_GIVEN, country: 'Egypt', type: 'coach') click to toggle source

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 next

# File lib/faker/default/world_cup.rb, line 76
def roster(legacy_country = NOT_GIVEN, legacy_type = NOT_GIVEN, country: 'Egypt', type: 'coach')
  warn_for_deprecated_arguments do |keywords|
    keywords << :country if legacy_country != NOT_GIVEN
    keywords << :type if legacy_type != NOT_GIVEN
  end

  fetch("world_cup.rosters.#{country}.#{type}")
end
stadium() click to toggle source

Produces the name of a stadium that has hosted a World Cup match.

@return [String]

@example

Faker::WorldCup.stadium #=> "Rostov Arena"

@faker.version next

# File lib/faker/default/world_cup.rb, line 41
def stadium
  fetch('world_cup.stadiums')
end
team() click to toggle source

Produces a national team name.

@return [String]

@example

Faker::WorldCup.team #=> "Iran"

@faker.version 1.9.0

# File lib/faker/default/world_cup.rb, line 15
def team
  fetch('world_cup.teams')
end