Class: Faker::Superhero

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

.descriptorString

Produces a superhero descriptor.

Examples:

Faker::Superhero.descriptor #=> "Bizarro"

Returns:



54
55
56
# File 'lib/faker/default/superhero.rb', line 54

def descriptor
  fetch('superhero.descriptor')
end

.nameString

Produces a random superhero name.

Examples:

Faker::Superhero.name #=> "Magnificent Shatterstar"

Returns:



67
68
69
# File 'lib/faker/default/superhero.rb', line 67

def name
  parse('superhero.name')
end

.powerString

Produces a superpower.

Examples:

Faker::Superhero.power #=> "Photokinesis"

Returns:



15
16
17
# File 'lib/faker/default/superhero.rb', line 15

def power
  fetch('superhero.power')
end

.prefixString

Produces a superhero name prefix.

Examples:

Faker::Superhero.prefix #=> "the Fated"

Returns:



28
29
30
# File 'lib/faker/default/superhero.rb', line 28

def prefix
  fetch('superhero.prefix')
end

.suffixString

Produces a superhero name suffix.

Examples:

Faker::Superhero.suffix #=> "Captain"

Returns:



41
42
43
# File 'lib/faker/default/superhero.rb', line 41

def suffix
  fetch('superhero.suffix')
end