Sha256: ea5fde76d4f28367daedce6b8ae531d80119c3ea0e2b926478520783d06a6655
Contents?: true
Size: 840 Bytes
Versions: 3
Compression:
Stored size: 840 Bytes
Contents
# encoding: utf-8 module FFaker # Author PapePathe<pathe.sene@gmail.com> github.com/PapePathe # The names & first names in this module were found at this url # https://github.com/fzaninotto/Faker/blob/master/src/Faker/Provider/fr_FR/Person.php module NameFR extend ModuleUtils extend self PREFIX = %w(de du le) # randomized? (FRENCH) prefix! # def prefix PREFIX.sample end def last_name LAST_NAMES.sample end def first_name FIRST_NAMES.sample end 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 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ffaker-2.2.0 | lib/ffaker/name_fr.rb |
ffaker-2.1.0 | lib/ffaker/name_fr.rb |
ffaker-2.0.0 | lib/ffaker/name_fr.rb |