class GovKit::CA::PostalCode::Strategy::NDPCa
Private Instance Methods
electoral_districts!()
click to toggle source
# File lib/gov_kit-ca/postal_code/strategy/ndp_ca.rb, line 12 def electoral_districts! Nokogiri::HTML(response.parsed_response, nil, 'utf-8').css('a.mp-riding-link,a.no-mp').map{|a| a[:href][/\d+\z/]} end
valid?()
click to toggle source
# File lib/gov_kit-ca/postal_code/strategy/ndp_ca.rb, line 16 def valid? !response.parsed_response['No ridings or MPs match this search.'] end