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


18
19
20
# File 'lib/ffaker/address_in.rb', line 18

def city
  fetch_sample(CITY)
end

#countryObject


46
47
48
# File 'lib/ffaker/address_in.rb', line 46

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

#country_codeObject


50
51
52
# File 'lib/ffaker/address_in.rb', line 50

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

#stateObject


22
23
24
# File 'lib/ffaker/address_in.rb', line 22

def state
  fetch_sample(STATE)
end

#state_abbrObject


26
27
28
# File 'lib/ffaker/address_in.rb', line 26

def state_abbr
  fetch_sample(STATE_ABBR)
end

#state_and_union_territoryObject


38
39
40
# File 'lib/ffaker/address_in.rb', line 38

def state_and_union_territory
  fetch_sample(STATE + UNION_TERRITORY)
end

#state_and_union_territory_abbrObject


42
43
44
# File 'lib/ffaker/address_in.rb', line 42

def state_and_union_territory_abbr
  fetch_sample(STATE_ABBR + UNION_TERRITORY_ABBR)
end

#time_zoneObject


54
55
56
# File 'lib/ffaker/address_in.rb', line 54

def time_zone
  'Asia/Kolkata'
end

#union_territoryObject


30
31
32
# File 'lib/ffaker/address_in.rb', line 30

def union_territory
  fetch_sample(UNION_TERRITORY)
end

#union_territory_abbrObject


34
35
36
# File 'lib/ffaker/address_in.rb', line 34

def union_territory_abbr
  fetch_sample(UNION_TERRITORY_ABBR)
end

#zip_codeObject Also known as: pincode


12
13
14
# File 'lib/ffaker/address_in.rb', line 12

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