Class: Faker::Movies::HarryPotter

Inherits:
Base
  • Object
show all
Defined in:
lib/faker/movies/harry_potter.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, translate, unique, with_locale

Class Method Details

.bookString

Produces a book from Harry Potter.

Examples:

Faker::Movies::HarryPotter.book #=> "Harry Potter and the Chamber of Secrets"

Returns:

  • (String)

Available since:

  • 1.7.3



55
56
57
# File 'lib/faker/movies/harry_potter.rb', line 55

def book
  fetch('harry_potter.books')
end

.characterString

Produces a character from Harry Potter.

Examples:

Faker::Movies::HarryPotter.character #=> "Harry Potter"

Returns:

  • (String)

Available since:

  • 1.7.3



16
17
18
# File 'lib/faker/movies/harry_potter.rb', line 16

def character
  fetch('harry_potter.characters')
end

.houseString

Produces a house from Harry Potter.

Examples:

Faker::Movies::HarryPotter.house #=> "Gryffindor"

Returns:

  • (String)

Available since:

  • 1.7.3



68
69
70
# File 'lib/faker/movies/harry_potter.rb', line 68

def house
  fetch('harry_potter.houses')
end

.locationString

Produces a location from Harry Potter.

Examples:

Faker::Movies::HarryPotter.location #=> "Hogwarts"

Returns:

  • (String)

Available since:

  • 1.7.3



29
30
31
# File 'lib/faker/movies/harry_potter.rb', line 29

def location
  fetch('harry_potter.locations')
end

.quoteString

Produces a quote from Harry Potter.

Examples:

Faker::Movies::HarryPotter.quote #=> "I solemnly swear that I am up to good."

Returns:

  • (String)

Available since:

  • 1.7.3



42
43
44
# File 'lib/faker/movies/harry_potter.rb', line 42

def quote
  fetch('harry_potter.quotes')
end

.spellString

Produces a spell from Harry Potter.

Examples:

Faker::Movies::HarryPotter.spell #=> "Reparo"

Returns:

  • (String)

Available since:

  • 1.7.3



81
82
83
# File 'lib/faker/movies/harry_potter.rb', line 81

def spell
  fetch('harry_potter.spells')
end