Module: Faker::NameDE
Constant Summary
collapse
- PREFIXES =
k %w(Herr Frau Dr. Prof.)
Constants included
from Name
Faker::Name::SUFFIXES
Instance Method Summary
collapse
const_missing, k, underscore
Methods included from Name
#suffix
Instance Method Details
#first_name ⇒ Object
19
20
21
|
# File 'lib/ffakerer/name_de.rb', line 19
def first_name
FIRST_NAMES.rand
end
|
#last_name ⇒ Object
23
24
25
|
# File 'lib/ffakerer/name_de.rb', line 23
def last_name
LAST_NAMES.rand
end
|
#name ⇒ Object
12
13
14
15
16
17
|
# File 'lib/ffakerer/name_de.rb', line 12
def name
case rand(10)
when 0 then "#{prefix} #{first_name} #{last_name}"
else "#{first_name} #{last_name}"
end
end
|
#prefix ⇒ Object
27
28
29
|
# File 'lib/ffakerer/name_de.rb', line 27
def prefix
PREFIXES.rand
end
|