Sha256: 717ff9d1328f6e7f695495e98a968c2d5b82b67575e24b76020379e5a77f82e2
Contents?: true
Size: 798 Bytes
Versions: 6
Compression:
Stored size: 798 Bytes
Contents
# encoding: utf-8 require 'ffaker/address' module FFaker module AddressBR include FFaker::Address extend ModuleUtils extend self STREET_PREFIX = %w[Rua Avenida Travessa Alameda].freeze def zip_code FFaker.numerify '#####-###' end def state fetch_sample(STATE) end def state_abbr fetch_sample(STATE_ABBR) end def city fetch_sample(CITY) end def street_prefix fetch_sample(STREET_PREFIX) end def street case rand(0..1) when 0 then "#{street_prefix} #{NameBR.name}" when 1 then "#{street_prefix} #{NameBR.first_name} #{NameBR.last_name} #{NameBR.last_name}" end end def full_address "#{street}, #{building_number}, #{city}, #{state}, Brazil" end end end
Version data entries
6 entries across 6 versions & 1 rubygems