Module: FFaker::NameBR
Constant Summary
collapse
- MALE_PREFIXES =
%w[Sr.].freeze
- FEMALE_PREFIXES =
%w[Sra. Srta.].freeze
- PREFIXES =
(MALE_PREFIXES + FEMALE_PREFIXES).freeze
- FIRST_NAMES =
(FIRST_NAMES_FEMALE + FIRST_NAMES_MALE).freeze
Instance Method Summary
collapse
const_missing, k, luhn_check, underscore, unique
#fetch_sample, #rand, #shuffle
Instance Method Details
#female_name_with_prefix ⇒ Object
26
27
28
|
# File 'lib/ffaker/name_br.rb', line 26
def female_name_with_prefix
"#{female_prefix} #{first_name_female} #{last_name}"
end
|
#female_prefix ⇒ Object
54
55
56
|
# File 'lib/ffaker/name_br.rb', line 54
def female_prefix
fetch_sample(FEMALE_PREFIXES)
end
|
#first_name ⇒ Object
34
35
36
|
# File 'lib/ffaker/name_br.rb', line 34
def first_name
fetch_sample(FIRST_NAMES)
end
|
#first_name_female ⇒ Object
38
39
40
|
# File 'lib/ffaker/name_br.rb', line 38
def first_name_female
fetch_sample(FIRST_NAMES_FEMALE)
end
|
#first_name_male ⇒ Object
42
43
44
|
# File 'lib/ffaker/name_br.rb', line 42
def first_name_male
fetch_sample(FIRST_NAMES_MALE)
end
|
#last_name ⇒ Object
46
47
48
|
# File 'lib/ffaker/name_br.rb', line 46
def last_name
fetch_sample(LAST_NAMES)
end
|
#male_name_with_prefix ⇒ Object
30
31
32
|
# File 'lib/ffaker/name_br.rb', line 30
def male_name_with_prefix
"#{male_prefix} #{first_name_male} #{last_name}"
end
|
#male_prefix ⇒ Object
58
59
60
|
# File 'lib/ffaker/name_br.rb', line 58
def male_prefix
fetch_sample(MALE_PREFIXES)
end
|
#name ⇒ Object
13
14
15
|
# File 'lib/ffaker/name_br.rb', line 13
def name
"#{first_name} #{last_name}"
end
|
#name_with_prefix ⇒ Object
17
18
19
20
21
22
23
24
|
# File 'lib/ffaker/name_br.rb', line 17
def name_with_prefix
fetch_sample(
[
female_name_with_prefix,
male_name_with_prefix
]
)
end
|
#prefix ⇒ Object
50
51
52
|
# File 'lib/ffaker/name_br.rb', line 50
def prefix
fetch_sample(PREFIXES)
end
|