Sha256: e6c483142ae4881bf4ab40fe752f84eded87d33e10417501f9a4a240dedf19ac
Contents?: true
Size: 632 Bytes
Versions: 4
Compression:
Stored size: 632 Bytes
Contents
module GovKit module CA module PostalCode module Strategy # @deprecated Due to redistribution. class DigitalCopyrightCa < Base base_uri 'www.digital-copyright.ca' http_method :get path '/edid/postal?postalcode=<%= @postal_code %>' private def electoral_districts! Nokogiri::HTML(response.parsed_response, nil, 'utf-8').css('.node .content a').map{|a| a[:href][/\d+\z/]} end def valid? !response.parsed_response.match /\b(invalid postal code|not found)\b/ end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems