Repository navigation
Expand file tree
/
Copy pathhobbit.rb
More file actions
62 lines (58 loc) · 1.45 KB
/
Copy pathhobbit.rb
File metadata and controls
62 lines (58 loc) · 1.45 KB
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
# frozen_string_literal: true
module Faker
class Movies
class Hobbit < Base
class << self
##
# Produces the name of a character from The Hobbit.
#
# @return [String]
#
# @example
# Faker::Movies::Hobbit.character #=> "Gandalf the Grey"
#
# @faker.version 1.8.0
def character
fetch('tolkien.hobbit.character')
end
##
# Produces the name of one of the 13 dwarves from the Company, or Gandalf or Bilbo.
#
# @return [String]
#
# @example
# Faker::Movies::Hobbit.thorins_company #=> "Thorin Oakenshield"
#
# @faker.version 1.8.0
def thorins_company
fetch('tolkien.hobbit.thorins_company')
end
##
# Produces a quote from The Hobbit.
#
# @return [String]
#
# @example
# Faker::Movies::Hobbit.quote
# #=> "Never laugh at live dragons, Bilbo you fool!"
#
# @faker.version 1.8.0
def quote
fetch('tolkien.hobbit.quote')
end
##
# Produces the name of a location from The Hobbit.
#
# @return [String]
#
# @example
# Faker::Movies::Hobbit.location #=> "The Shire"
#
# @faker.version 1.8.0
def location
fetch('tolkien.hobbit.location')
end
end
end
end
end