Module: FFaker::AddressIN

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

Constant Summary

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, luhn_check, underscore, unique

Methods included from RandomUtils

#fetch_sample, #rand, #shuffle

Methods included from Address

#building_number, #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

#cityObject



16
17
18
# File 'lib/ffaker/address_in.rb', line 16

def city
  fetch_sample(CITY)
end

#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

#stateObject



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

def state
  fetch_sample(STATE)
end

#state_abbrObject



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

def state_abbr
  fetch_sample(STATE_ABBR)
end

#state_and_union_territoryObject



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

def state_and_union_territory
  fetch_sample(STATE + UNION_TERRITORY)
end

#state_and_union_territory_abbrObject



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

def state_and_union_territory_abbr
  fetch_sample(STATE_ABBR + UNION_TERRITORY_ABBR)
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
  fetch_sample(UNION_TERRITORY)
end

#union_territory_abbrObject



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

def union_territory_abbr
  fetch_sample(UNION_TERRITORY_ABBR)
end

#zip_codeObject Also known as: pincode



10
11
12
# File 'lib/ffaker/address_in.rb', line 10

def zip_code
  FFaker.numerify('######')
end