Class: GenPostcodeData

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/SykGenData/generators/gen_postcode_data.rb

Instance Method Summary collapse

Instance Method Details

#get_postcodeObject



8
9
10
# File 'lib/SykGenData/generators/gen_postcode_data.rb', line 8

def get_postcode
  JSON.parse(self.class.get('/random/postcodes').body)['result']['postcode'].gsub(' ', '')
end