/
star_wars.ex
58 lines (48 loc) · 1.53 KB
/
star_wars.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
defmodule Faker.StarWars do
import Faker, only: [localize: 1]
@moduledoc """
Functions for generating StarWars related data
"""
@doc """
Returns a Star Wars character name
## Examples
iex> Faker.StarWars.character()
"Greedo"
iex> Faker.StarWars.character()
"Jek Tono Porkins"
iex> Faker.StarWars.character()
"Poe Dameron"
iex> Faker.StarWars.character()
"R4-P17"
"""
@spec character() :: String.t()
localize(:character)
@doc """
Returns a Star Wars planet name
## Examples
iex> Faker.StarWars.planet()
"Mon Cala"
iex> Faker.StarWars.planet()
"Ryloth"
iex> Faker.StarWars.planet()
"Endor"
iex> Faker.StarWars.planet()
"Shili"
"""
@spec planet() :: String.t()
localize(:planet)
@doc """
Returns a Star Wars quote
## Examples
iex> Faker.StarWars.quote()
"Congratulations. You are being rescued. Please do not resist."
iex> Faker.StarWars.quote()
"What chance do we have? The question is 'what choice'. Run, hide, plead for mercy, scatter your forces. You give way to an enemy this evil with this much power and you condemn the galaxy to an eternity of submission. The time to fight is now!"
iex> Faker.StarWars.quote()
"Will someone get this big walking carpet out of my way?"
iex> Faker.StarWars.quote()
"To be Jedi is to face the truth, and choose. Give off light, or darkness, Padawan. Be a candle, or the night."
"""
@spec quote() :: String.t()
localize(:quote)
end