module Faker::AddressMX

Author guapolo<github.com/guapolo>

Constants

MUNICIPALITY
POSTAL_CODE_FORMATS

Public Instance Methods

municipality(st_abbr = nil) click to toggle source
# File lib/ffakerer/address_mx.rb, line 30
def municipality(st_abbr = nil)
  st_abbr ||= state_abbr
  MUNICIPALITY[st_abbr][rand(MUNICIPALITY[st_abbr].size)]
end
postal_code() click to toggle source
# File lib/ffakerer/address_mx.rb, line 17
def postal_code
  Faker.numerify POSTAL_CODE_FORMATS.rand
end
state() click to toggle source
# File lib/ffakerer/address_mx.rb, line 21
def state
  STATE.rand
end
state_abbr(st_name = nil) click to toggle source
# File lib/ffakerer/address_mx.rb, line 25
def state_abbr(st_name = nil)
 st_name ||= state
  STATE_ABBR[STATE.index(st_name)]
end
zip_code() click to toggle source
# File lib/ffakerer/address_mx.rb, line 13
def zip_code
  Faker::AddressUS.zip_code
end