Sha256: 564ffb9927896ce158774852d2160e400a2c1177c0d8b3f71b1d8827284e7343
Contents?: true
Size: 620 Bytes
Versions: 5
Compression:
Stored size: 620 Bytes
Contents
# encoding: utf-8 require 'ffaker/address' module Faker module AddressDE include Faker::Address extend ModuleUtils extend self def zip_code Faker.numerify '#####' end def state STATE.sample end def city CITY.sample end def street_name case rand(2) when 0 then "#{NameDE.last_name}" when 1 then "#{NameDE.first_name}" end << case rand(20) when 0 then "weg" when 1 then "gasse" when 3 then "hain" else "str." end end def street_address "#{street_name} #{1+rand(192)}" end end end
Version data entries
5 entries across 5 versions & 2 rubygems