Sha256: 11bbbb43cb6daa1e00ec01562a6bf6294d672f052901556b1e7ed62ba68f13be
Contents?: true
Size: 1.12 KB
Versions: 4
Compression:
Stored size: 1.12 KB
Contents
# encoding: utf-8 module FFaker module NameBR extend ModuleUtils extend self MALE_PREFIXES = %w(Sr.).freeze FEMALE_PREFIXES = %w(Sra. Srta.).freeze PREFIXES = (MALE_PREFIXES + FEMALE_PREFIXES).freeze FIRST_NAMES = (FIRST_NAMES_FEMALE + FIRST_NAMES_MALE).freeze def name "#{first_name} #{last_name}" end def name_with_prefix fetch_sample( [ female_name_with_prefix, male_name_with_prefix ] ) end def female_name_with_prefix "#{female_prefix} #{first_name_female} #{last_name}" end def male_name_with_prefix "#{male_prefix} #{first_name_male} #{last_name}" end def first_name fetch_sample(FIRST_NAMES) end def first_name_female fetch_sample(FIRST_NAMES_FEMALE) end def first_name_male fetch_sample(FIRST_NAMES_MALE) end def last_name fetch_sample(LAST_NAMES) end def prefix fetch_sample(PREFIXES) end def female_prefix fetch_sample(FEMALE_PREFIXES) end def male_prefix fetch_sample(MALE_PREFIXES) end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
ffaker-2.6.0 | lib/ffaker/name_br.rb |
ffaker-2.5.0 | lib/ffaker/name_br.rb |
ffaker-2.4.0 | lib/ffaker/name_br.rb |
ffaker-2.3.0 | lib/ffaker/name_br.rb |