Module: FFaker::NameSN
Overview
Constant Summary
collapse
- PREFIX_FEMALE =
%w[adja adjaratou mame ndeye].freeze
- PREFIX_MALE =
%w[pape eladji mame serigne].freeze
Instance Method Summary
collapse
const_missing, k, luhn_check, underscore, unique
#fetch_sample, #rand, #shuffle
Instance Method Details
#first_name_female ⇒ Object
21
22
23
|
# File 'lib/ffaker/name_sn.rb', line 21
def first_name_female
fetch_sample(FIRST_NAMES_FEMALE)
end
|
#first_name_male ⇒ Object
17
18
19
|
# File 'lib/ffaker/name_sn.rb', line 17
def first_name_male
fetch_sample(FIRST_NAMES_MALE)
end
|
#last_name ⇒ Object
13
14
15
|
# File 'lib/ffaker/name_sn.rb', line 13
def last_name
fetch_sample(LAST_NAMES)
end
|
#name_female ⇒ Object
40
41
42
43
44
45
|
# File 'lib/ffaker/name_sn.rb', line 40
def name_female
case rand(0..9)
when 5, 7 then "#{prefix_female} #{first_name_female} #{last_name}"
else "#{first_name_female} #{last_name}"
end
end
|
#name_male ⇒ Object
33
34
35
36
37
38
|
# File 'lib/ffaker/name_sn.rb', line 33
def name_male
case rand(0..9)
when 5, 7 then "#{prefix_male} #{first_name_male} #{last_name}"
else "#{first_name_male} #{last_name}"
end
end
|
#name_sn ⇒ Object
47
48
49
50
51
52
53
54
|
# File 'lib/ffaker/name_sn.rb', line 47
def name_sn
case rand(0..5)
when 0 then "#{prefix_female} #{first_name_female} #{last_name}"
when 1 then "#{prefix_male} #{first_name_male} #{last_name}"
when 2, 4 then "#{first_name_male} #{last_name}"
when 3, 5 then "#{first_name_female} #{last_name}"
end
end
|
#prefix_female ⇒ Object
29
30
31
|
# File 'lib/ffaker/name_sn.rb', line 29
def prefix_female
fetch_sample(PREFIX_FEMALE)
end
|
#prefix_male ⇒ Object
25
26
27
|
# File 'lib/ffaker/name_sn.rb', line 25
def prefix_male
fetch_sample(PREFIX_MALE)
end
|