Class: Faker::Sports::Football

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/sports/football.rb

Constant Summary

Constants inherited from Base

Base::LLetters, Base::Letters, Base::NOT_GIVEN, Base::Numbers, Base::ULetters

Class Method Summary collapse

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

.coachString

Produces the name of a football coach.

Examples:

Faker::Sports::Football.coach #=> "Jose Mourinho"

Returns:



42
43
44
# File 'lib/faker/sports/football.rb', line 42

def coach
  fetch('football.coaches')
end

.competitionString

Produces a football competition.

Examples:

Faker::Sports::Football.competition #=> "FIFA World Cup"

Returns:



55
56
57
# File 'lib/faker/sports/football.rb', line 55

def competition
  fetch('football.competitions')
end

.playerString

Produces the name of a football player.

Examples:

Faker::Sports::Football.player #=> "Lionel Messi"

Returns:



29
30
31
# File 'lib/faker/sports/football.rb', line 29

def player
  fetch('football.players')
end

.positionString

Produces a position in football.

Examples:

Faker::Sports::Football.position #=> "Defensive Midfielder"

Returns:



68
69
70
# File 'lib/faker/sports/football.rb', line 68

def position
  fetch('football.positions')
end

.teamString

Produces the name of a football team.

Examples:

Faker::Sports::Football.team #=> "Manchester United"

Returns:



16
17
18
# File 'lib/faker/sports/football.rb', line 16

def team
  fetch('football.teams')
end