Class: Faker::Games::Pokemon

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

.locationString

Produces a location from Pokemon.

Examples:

Faker::Games::Pokemon.location #=> "Pallet Town"

Returns:

  • (String)

Available since:

  • 1.7.0



29
30
31
# File 'lib/faker/games/pokemon.rb', line 29

def location
  fetch('games.pokemon.locations')
end

.moveString

Produces a move from Pokemon.

Examples:

Faker::Games::Pokemon.move #=> "Thunder Shock"

Returns:

  • (String)

Available since:

  • 1.7.0



42
43
44
# File 'lib/faker/games/pokemon.rb', line 42

def move
  fetch('games.pokemon.moves')
end

.nameString

Produces the name of a Pokemon.

Examples:

Faker::Games::Pokemon.name #=> "Pikachu"

Returns:

  • (String)

Available since:

  • 1.7.0



16
17
18
# File 'lib/faker/games/pokemon.rb', line 16

def name
  fetch('games.pokemon.names')
end