module MapitPostcode

Constants

BASE_URL
VERSION

Public Class Methods

get(postcode) click to toggle source

Your code goes here…

# File lib/mapitpostcode.rb, line 8
def self.get(postcode)
  postcode.downcase!
  postcode.gsub!(" ", "")
  JSON.parse(open(BASE_URL + postcode).read)
end