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, letterify, method_missing, numerify, parse, rand, rand_in_range, regexify, resolve, respond_to_missing?, sample, 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:

  • (String)

Available since:

  • 1.8.0


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

def character
  fetch('hobbit.character')
end

.locationString

Produces the name of a location from The Hobbit.

Examples:

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

Returns:

  • (String)

Available since:

  • 1.8.0


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

def location
  fetch('hobbit.location')
end

.quoteString

Produces a quote from The Hobbit.

Examples:

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

Returns:

  • (String)

Available since:

  • 1.8.0


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

def quote
  fetch('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:

  • (String)

Available since:

  • 1.8.0


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

def thorins_company
  fetch('hobbit.thorins_company')
end