Class: Faker::Indian::Address

Inherits:
Object
  • Object
show all
Defined in:
lib/faker/indian/address.rb

Constant Summary collapse

LOCATIONS =
_data.fetch(:locations).freeze
STREETS =
_data.fetch(:streets).freeze

Class Method Summary collapse

Class Method Details

.cityObject



14
15
16
# File 'lib/faker/indian/address.rb', line 14

def city
  sample_location[:city]
end

.full_addressObject



26
27
28
29
# File 'lib/faker/indian/address.rb', line 26

def full_address
  loc = sample_location
  "#{random_street_number} #{random_street}, #{loc[:city]}, #{loc[:state]} - #{loc[:pincode]}"
end

.pincodeObject



22
23
24
# File 'lib/faker/indian/address.rb', line 22

def pincode
  sample_location[:pincode]
end

.stateObject



18
19
20
# File 'lib/faker/indian/address.rb', line 18

def state
  sample_location[:state]
end