forked from elixirs/faker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
en.ex
110 lines (103 loc) · 1.82 KB
/
en.ex
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
defmodule Faker.Team.En do
import Faker, only: [sampler: 2]
alias Faker.Address
@moduledoc """
Functions for generating team related data in English
"""
@doc """
Returns a string of the form [state] [creature]
## Examples
iex> Faker.Team.En.name()
"Hawaii cats"
iex> Faker.Team.En.name()
"Oklahoma banshees"
iex> Faker.Team.En.name()
"Texas elves"
iex> Faker.Team.En.name()
"Iowa fishes"
"""
@spec name() :: String.t()
def name, do: "#{Address.state()} #{creature()}"
@doc """
Returns a random creature name
## Examples
iex> Faker.Team.En.creature()
"prophets"
iex> Faker.Team.En.creature()
"cats"
iex> Faker.Team.En.creature()
"enchanters"
iex> Faker.Team.En.creature()
"banshees"
"""
@spec creature() :: String.t()
sampler(:creature, [
"ants",
"banshees",
"bats",
"bears",
"bees",
"birds",
"black cats",
"buffalo",
"cats",
"cattle",
"chickens",
"chimeras",
"conspirators",
"crows",
"dogs",
"dolphins",
"dragons",
"druids",
"ducks",
"dwarves",
"elephants",
"elves",
"enchanters",
"exorcists",
"fishes",
"foes",
"foxes",
"frogs",
"geese",
"ghosts",
"giants",
"gnomes",
"goats",
"goblins",
"gooses",
"griffins",
"horses",
"kangaroos",
"lions",
"lycanthropes",
"monkeys",
"nemesis",
"ogres",
"oracles",
"owls",
"oxen",
"penguins",
"people",
"pigs",
"prophets",
"rabbits",
"sheep",
"sons",
"sorcerors",
"spiders",
"spirits",
"tigers",
"vampires",
"vixens",
"warlocks",
"werewolves",
"whales",
"witches",
"wolves",
"worshipers",
"zebras",
"zombies"
])
end