Module: Faker::NameGA
Overview
Constant Summary
collapse
- LAST_NAMES =
k %w(jammeh ceesay)
Instance Method Summary
collapse
const_missing, k, underscore
Instance Method Details
#first_name_female ⇒ Object
13
14
15
|
# File 'lib/ffakerer/name_ga.rb', line 13
def first_name_female
FIRST_NAMES_FEMALE.rand
end
|
#first_name_male ⇒ Object
17
18
19
|
# File 'lib/ffakerer/name_ga.rb', line 17
def first_name_male
FIRST_NAMES_MALE.rand
end
|
#last_name ⇒ Object
21
22
23
|
# File 'lib/ffakerer/name_ga.rb', line 21
def last_name
LAST_NAMES.rand
end
|
#name ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
45
|
# File 'lib/ffakerer/name_ga.rb', line 33
def name
case rand(10)
when 9 then name_female
when 8 then name_male
when 7 then name_female
when 6 then name_male
when 5 then name_female
when 4 then name_male
when 3 then name_female
when 2 then name_male
else name_female
end
end
|
#name_female ⇒ Object
29
30
31
|
# File 'lib/ffakerer/name_ga.rb', line 29
def name_female
"#{first_name_female} #{last_name}"
end
|
#name_male ⇒ Object
25
26
27
|
# File 'lib/ffakerer/name_ga.rb', line 25
def name_male
"#{first_name_male} #{last_name}"
end
|