1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
# frozen_string_literal: true
module Faker
class Superhero < Base
class << self
##
# Produces a superpower.
#
# @return [String]
#
# @example
# Faker::Superhero.power #=> "Photokinesis"
#
# @faker.version 1.6.2
def power
fetch('superhero.power')
end
##
# Produces a superhero name prefix.
#
# @return [String]
#
# @example
# Faker::Superhero.prefix #=> "the Fated"
#
# @faker.version 1.6.2
def prefix
fetch('superhero.prefix')
end
##
# Produces a superhero name suffix.
#
# @return [String]
#
# @example
# Faker::Superhero.suffix #=> "Captain"
#
# @faker.version 1.6.2
def suffix
fetch('superhero.suffix')
end
##
# Produces a superhero descriptor.
#
# @return [String]
#
# @example
# Faker::Superhero.descriptor #=> "Bizarro"
#
# @faker.version 1.6.2
def descriptor
fetch('superhero.descriptor')
end
##
# Produces a random superhero name.
#
# @return [String]
#
# @example
# Faker::Superhero.name #=> "Magnificent Shatterstar"
#
# @faker.version 1.6.2
def name
parse('superhero.name')
end
end
end
end
|