Class: Faker::Movies::Hobbit

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

.characterString

Produces the name of a character from The Hobbit.

Examples:

Faker::Movies::Hobbit.character #=> "Gandalf the Grey"

Returns:



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

def character
  fetch('tolkien.hobbit.character')
end

.locationString

Produces the name of a location from The Hobbit.

Examples:

Faker::Movies::Hobbit.location #=> "The Shire"

Returns:



56
57
58
# File 'lib/faker/movies/hobbit.rb', line 56

def location
  fetch('tolkien.hobbit.location')
end

.quoteString

Produces a quote from The Hobbit.

Examples:

Faker::Movies::Hobbit.quote
  #=> "Never laugh at live dragons, Bilbo you fool!"

Returns:



43
44
45
# File 'lib/faker/movies/hobbit.rb', line 43

def quote
  fetch('tolkien.hobbit.quote')
end

.thorins_companyString

Produces the name of one of the 13 dwarves from the Company, or Gandalf or Bilbo.

Examples:

Faker::Movies::Hobbit.thorins_company #=> "Thorin Oakenshield"

Returns:



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

def thorins_company
  fetch('tolkien.hobbit.thorins_company')
end