forked from faker-ruby/faker
/
harry_potter.rb
87 lines (81 loc) · 1.94 KB
/
harry_potter.rb
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# frozen_string_literal: true
module Faker
class Movies
class HarryPotter < Base
class << self
##
# Produces a character from Harry Potter.
#
# @return [String]
#
# @example
# Faker::Movies::HarryPotter.character #=> "Harry Potter"
#
# @faker.version 1.7.3
def character
fetch('harry_potter.characters')
end
##
# Produces a location from Harry Potter.
#
# @return [String]
#
# @example
# Faker::Movies::HarryPotter.location #=> "Hogwarts"
#
# @faker.version 1.7.3
def location
fetch('harry_potter.locations')
end
##
# Produces a quote from Harry Potter.
#
# @return [String]
#
# @example
# Faker::Movies::HarryPotter.quote #=> "I solemnly swear that I am up to good."
#
# @faker.version 1.7.3
def quote
fetch('harry_potter.quotes')
end
##
# Produces a book from Harry Potter.
#
# @return [String]
#
# @example
# Faker::Movies::HarryPotter.book #=> "Harry Potter and the Chamber of Secrets"
#
# @faker.version 1.7.3
def book
fetch('harry_potter.books')
end
##
# Produces a house from Harry Potter.
#
# @return [String]
#
# @example
# Faker::Movies::HarryPotter.house #=> "Gryffindor"
#
# @faker.version 1.7.3
def house
fetch('harry_potter.houses')
end
##
# Produces a spell from Harry Potter.
#
# @return [String]
#
# @example
# Faker::Movies::HarryPotter.spell #=> "Reparo"
#
# @faker.version 1.7.3
def spell
fetch('harry_potter.spells')
end
end
end
end
end