Module: FFaker::AddressIN

Extended by:
AddressIN, ModuleUtils
Includes:
Address
Included in:
AddressIN
Defined in:
lib/ffaker/address_in.rb

Constant Summary collapse

ZIP_FORMATS =
['######']

Constants included from Address

FFaker::Address::CITY_PREFIXES, FFaker::Address::COMPASS_DIRECTIONS, FFaker::Address::SEC_ADDR

Instance Method Summary collapse

Methods included from ModuleUtils

const_missing, k, underscore

Methods included from Address

#building_number, #city, #city_prefix, #city_suffix, #neighborhood, #secondary_address, #street_address, #street_name, #street_suffix, #uk_country, #uk_county, #uk_postcode, #us_state, #us_state_abbr

Instance Method Details

#countryObject



44
45
46
# File 'lib/ffaker/address_in.rb', line 44

def country
  FFaker::Address.country('IN')
end

#country_codeObject



48
49
50
# File 'lib/ffaker/address_in.rb', line 48

def country_code
  FFaker::Address.country_code('India')
end

#pincodeObject Also known as: zip_code



14
15
16
# File 'lib/ffaker/address_in.rb', line 14

def pincode
  FFaker.numerify ZIP_FORMATS.sample
end

#stateObject



20
21
22
# File 'lib/ffaker/address_in.rb', line 20

def state
  STATE.sample
end

#state_abbrObject



24
25
26
# File 'lib/ffaker/address_in.rb', line 24

def state_abbr
  STATE_ABBR.sample
end

#state_and_union_territoryObject



36
37
38
# File 'lib/ffaker/address_in.rb', line 36

def state_and_union_territory
  (STATE + UNION_TERRITORY).sample
end

#state_and_union_territory_abbrObject



40
41
42
# File 'lib/ffaker/address_in.rb', line 40

def state_and_union_territory_abbr
  (STATE_ABBR + UNION_TERRITORY_ABBR).sample
end

#time_zoneObject



52
53
54
# File 'lib/ffaker/address_in.rb', line 52

def time_zone
  'Asia/Kolkata'
end

#union_territoryObject



28
29
30
# File 'lib/ffaker/address_in.rb', line 28

def union_territory
  UNION_TERRITORY.sample
end

#union_territory_abbrObject



32
33
34
# File 'lib/ffaker/address_in.rb', line 32

def union_territory_abbr
  UNION_TERRITORY_ABBR.sample
end