Class: Faker::Team

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/default/team.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

.creatureString

Produces a team creature.

Examples:

Faker::Team.creature #=> "geese"

Returns:

  • (String)

Available since:

  • 1.3.0



30
31
32
# File 'lib/faker/default/team.rb', line 30

def creature
  fetch('team.creature')
end

.mascotString

Produces the name of a team mascot.

Examples:

Faker::Team.mascot #=> "Hugo"

Returns:

  • (String)

Available since:

  • 1.8.1



69
70
71
# File 'lib/faker/default/team.rb', line 69

def mascot
  fetch('team.mascot')
end

.nameString

Produces a team name from a state and a creature.

Examples:

Faker::Team.name #=> "Oregon vixens"

Returns:

  • (String)

Available since:

  • 1.3.0



17
18
19
# File 'lib/faker/default/team.rb', line 17

def name
  parse('team.name')
end

.sportString

Produces a team sport.

Examples:

Faker::Team.sport #=> "Lacrosse"

Returns:

  • (String)

Available since:

  • 1.5.0



56
57
58
# File 'lib/faker/default/team.rb', line 56

def sport
  fetch('team.sport')
end

.stateString

Produces a team state.

Examples:

Faker::Team.state #=> "Oregon"

Returns:

  • (String)

Available since:

  • 1.3.0



43
44
45
# File 'lib/faker/default/team.rb', line 43

def state
  fetch('address.state')
end