Class: Faker::DcComics

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/default/dc_comics.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, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, shuffle, translate, unique, with_locale

Class Method Details

.heroString

Produces a hero name from DC Comics

Examples:

Faker::DcComics.hero #=> "Batman"

Returns:

  • (String)

Available since:

  • 1.9.2


14
15
16
# File 'lib/faker/default/dc_comics.rb', line 14

def self.hero
  fetch('dc_comics.hero')
end

.heroineString

Produces a heroine name from DC Comics

Examples:

Faker::DcComics.heroine #=> "Supergirl"

Returns:

  • (String)

Available since:

  • 1.9.2


27
28
29
# File 'lib/faker/default/dc_comics.rb', line 27

def self.heroine
  fetch('dc_comics.heroine')
end

.nameString

Produces a character name from DC Comics

Examples:

Faker::DcComics.name #=> "Clark Kent"

Returns:

  • (String)

Available since:

  • 1.9.2


53
54
55
# File 'lib/faker/default/dc_comics.rb', line 53

def self.name
  fetch('dc_comics.name')
end

.titleString

Produces a comic book title from DC Comics

Examples:

Faker::DcComics.title #=> "Batman: The Long Halloween"

Returns:

  • (String)

Available since:

  • 1.9.2


66
67
68
# File 'lib/faker/default/dc_comics.rb', line 66

def self.title
  fetch('dc_comics.title')
end

.villainString

Produces a villain name from DC Comics

Examples:

Faker::DcComics.villain #=> "The Joker"

Returns:

  • (String)

Available since:

  • 1.9.2


40
41
42
# File 'lib/faker/default/dc_comics.rb', line 40

def self.villain
  fetch('dc_comics.villain')
end