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::FEMALE_PREFIXES, FFaker::Name::FIRST_NAMES, FFaker::Name::MALE_PREFIXES, FFaker::Name::OTHER_PREFIXES, FFaker::Name::PREFIXES, FFaker::Name::SUFFIXES

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, luhn_check, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Methods included from Name

#female_name_with_prefix, #female_name_with_prefix_suffix, #female_name_with_suffix, #female_prefix, #first_name, #first_name_female, #first_name_male, #html_safe_last_name, #html_safe_name, #male_name_with_prefix, #male_name_with_prefix_suffix, #male_name_with_suffix, #male_prefix, #name_with_prefix, #name_with_prefix_suffix, #name_with_suffix, #other_prefix, #prefix, #pronouns, #suffix

Instance Method Details

#last_nameObject



11
12
13
14
15
16
# File 'lib/ffaker/name_ph.rb', line 11

def last_name
  case rand(0..1)
  when 0 then fetch_sample(AUTOCHTHONOUS_SURNAMES)
  else        fetch_sample(SPANISH_SURNAMES)
  end
end

#nameObject



18
19
20
21
22
23
# File 'lib/ffaker/name_ph.rb', line 18

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