Module: FFaker::NamePH

Extended by:
ModuleUtils, NamePH
Includes:
Name
Included in:
NamePH
Defined in:
lib/ffaker/name_ph.rb

Overview

Philippine names based on en.wikipedia.org/wiki/Philippine_name

Constant Summary

Constants included from Name

FFaker::Name::PREFIXES, FFaker::Name::SUFFIXES

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore

Methods included from Name

#first_name, #prefix, #suffix

Instance Method Details

#last_nameObject



13
14
15
16
17
18
19
20
# File 'lib/ffaker/name_ph.rb', line 13

def last_name
  case rand(2)
  when 0
    AUTOCHTHONOUS_SURNAMES.sample
  else
    SPANISH_SURNAMES.sample
  end
end

#nameObject



22
23
24
25
26
27
# File 'lib/ffaker/name_ph.rb', line 22

def name
  case rand(9)
  when 0 then "#{prefix} #{first_name} #{last_name}"
  else        "#{first_name} #{last_name}"
  end
end