Sha256: 701f2fa986fe6824b6612c89985552b9703ab0cb493e60a5dfba27ca1aae36dc

Contents?: true

Size: 251 Bytes

Versions: 1

Compression:

Stored size: 251 Bytes

Contents

require 'rubygems'
require 'weary'

class PatClient < Weary::Client
  domain "http://www.uk-postcodes.com"
  
  get :get, "/postcode/{code}.json"
end

class Pat
  def self.get(code)
    PatClient.new.get(:code => code.gsub(' ', '')).perform
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pat-0.2.0 lib/pat.rb