Sha256: 7de5a8454eafd5ad449fcb636b7060b09ed2911b8bf1628ce15b11a35c843880
Contents?: true
Size: 599 Bytes
Versions: 1
Compression:
Stored size: 599 Bytes
Contents
module GovKit module CA module PostalCode module Strategy class GreenPartyCa < Base base_uri 'www.greenparty.ca' http_method :post path '/en/party/find-your-riding' post_data 'form_id=gpc_glue_riding_lookup_form&postal_code=<%= @postal_code %>' private def electoral_districts! [ response.headers['location'][/\d+\z/] ] end def valid? response.headers['location'] != 'http://www.greenparty.ca/en/party/find-your-riding' end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
govkit-ca-0.0.11 | lib/gov_kit-ca/postal_code/strategy/greenparty_ca.rb |