Sha256: 480c05707f1fe3b0a57b53c75fccb592e0aef4f6a70a4fd4e7f3f5f93effb757
Contents?: true
Size: 582 Bytes
Versions: 1
Compression:
Stored size: 582 Bytes
Contents
# frozen_string_literal: true module FFakerTW module AddressMX extend ModuleUtils extend self def zip_code FFakerTW.numerify('#####') end def postal_code FFakerTW.numerify('#####') end def state fetch_sample(STATE) end def state_abbr(st_name = nil) st_name ||= state STATE_ABBR[STATE.index(st_name)] end def municipality(st_abbr = nil) st_abbr ||= state_abbr municipalities = Object.const_get("FFakerTW::AddressMX::#{st_abbr.upcase}") fetch_sample(municipalities) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ffakerTW-0.1.0 | lib/ffakerTW/address_mx.rb |