Module: FFaker::NameFR
Overview
Author PapePathe<[email protected]> github.com/PapePathe The names & first names in this module were found at this url github.com/fzaninotto/Faker/blob/master/src/Faker/Provider/fr_FR/Person.php
Constant Summary collapse
- PREFIX =
%w(de du le).freeze
Instance Method Summary collapse
- #first_name ⇒ Object
- #last_name ⇒ Object
- #name ⇒ Object
-
#prefix ⇒ Object
randomized? (FRENCH) prefix!.
Methods included from ModuleUtils
Methods included from RandomUtils
#fetch_sample, #rand, #shuffle
Instance Method Details
#first_name ⇒ Object
23 24 25 |
# File 'lib/ffaker/name_fr.rb', line 23 def first_name fetch_sample(FIRST_NAMES) end |
#last_name ⇒ Object
19 20 21 |
# File 'lib/ffaker/name_fr.rb', line 19 def last_name fetch_sample(LAST_NAMES) end |
#name ⇒ Object
27 28 29 30 31 32 33 34 35 |
# File 'lib/ffaker/name_fr.rb', line 27 def name case rand(10) when 7 then "#{first_name} #{prefix} #{last_name}" when 5 then "#{first_name} #{prefix} #{last_name}" when 3 then "#{first_name} #{last_name}" when 0 then "#{first_name} #{last_name}" else "#{first_name} #{last_name}" end end |
#prefix ⇒ Object
randomized? (FRENCH) prefix!
15 16 17 |
# File 'lib/ffaker/name_fr.rb', line 15 def prefix fetch_sample(PREFIX) end |