Module: FFaker::NameGA

Extended by:
ModuleUtils, NameGA
Included in:
NameGA
Defined in:
lib/ffaker/name_ga.rb

Overview

Generates names from Gambia West Africa Source: www.columbia.edu/~msj42/Common%20Gambian%20First%20Names.htm

Constant Summary collapse

LAST_NAMES =
%w(jammeh ceesay)

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore

Instance Method Details

#first_name_femaleObject



12
13
14
# File 'lib/ffaker/name_ga.rb', line 12

def first_name_female
  FIRST_NAMES_FEMALE.sample
end

#first_name_maleObject



16
17
18
# File 'lib/ffaker/name_ga.rb', line 16

def first_name_male
  FIRST_NAMES_MALE.sample
end

#last_nameObject



20
21
22
# File 'lib/ffaker/name_ga.rb', line 20

def last_name
  LAST_NAMES.sample
end

#nameObject



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/ffaker/name_ga.rb', line 32

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_femaleObject



28
29
30
# File 'lib/ffaker/name_ga.rb', line 28

def name_female
  "#{first_name_female} #{last_name}"
end

#name_maleObject



24
25
26
# File 'lib/ffaker/name_ga.rb', line 24

def name_male
  "#{first_name_male} #{last_name}"
end