forked from elixirs/faker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
es.ex
41 lines (34 loc) · 1004 Bytes
/
es.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
defmodule Faker.Internet.Es do
import Faker, only: [sampler: 2]
@moduledoc """
Generating internet related data in Spanish
"""
@doc """
Returns a random free email service name
## Examples
iex> Faker.Internet.Es.free_email_service()
"gmail.com"
iex> Faker.Internet.Es.free_email_service()
"hotmail.com"
iex> Faker.Internet.Es.free_email_service()
"gmail.com"
iex> Faker.Internet.Es.free_email_service()
"hotmail.com"
"""
@spec free_email_service() :: String
sampler(:free_email_service, ["gmail.com", "yahoo.com", "hotmail.com"])
@doc """
Returns a random domain suffix
## Examples
iex> Faker.Internet.Es.domain_suffix()
"com"
iex> Faker.Internet.Es.domain_suffix()
"es"
iex> Faker.Internet.Es.domain_suffix()
"com"
iex> Faker.Internet.Es.domain_suffix()
"org"
"""
@spec domain_suffix() :: String.t()
sampler(:domain_suffix, ["com", "es", "info", "com.es", "org"])
end