Class: Faker::Games::Heroes

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

.artifactString

Produces the name of an artifact from Heroes 3.

Examples:

Faker::Games::Heroes.artifact #=> "Armageddon's Blade"

Returns:

  • (String)

Available since:

  • next



55
56
57
# File 'lib/faker/games/heroes.rb', line 55

def artifact
  fetch('heroes.artifacts')
end

.klassString

Produces the name of a class from Heroes 3.

Examples:

Faker::Games::Heroes.klass #=> "Knight"

Returns:

  • (String)

Available since:

  • 1.9.2



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

def klass
  fetch('heroes.klasses')
end

.nameString

Produces the name of a hero from Heroes 3.

Examples:

Faker::Games::Heroes.name #=> "Christian"

Returns:

  • (String)

Available since:

  • 1.9.2



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

def name
  fetch('heroes.names')
end

.specialtyString

Produces the name of a specialty from Heroes 3.

Examples:

Faker::Games::Heroes.specialty #=> "Ballista"

Returns:

  • (String)

Available since:

  • 1.9.2



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

def specialty
  fetch('heroes.specialties')
end