class SgPostcode::Google

Constants

REQUEST_SERVICE_URL

Request URL

Public Class Methods

new(postcode) click to toggle source
# File lib/sg_postcode/services/google.rb, line 8
def initialize(postcode)
  @postcode = postcode
end

Public Instance Methods

request() click to toggle source

Send Request with the postcode included as a params

@example

sender = SgPostcode:Google.new('238432')
sender.request
# File lib/sg_postcode/services/google.rb, line 18
def request
  RestClient.get REQUEST_SERVICE_URL, { params: { address: @postcode } }
end