Class: GovKit::FollowTheMoney::IndustryContribution
- Inherits:
-
Contribution
- Object
- Resource
- GovKit::FollowTheMoneyResource
- Contribution
- GovKit::FollowTheMoney::IndustryContribution
- Defined in:
- lib/gov_kit/follow_the_money.rb
Overview
Wrap contributions by industry to a candidate. See the FollowTheMoney API.
Instance Attribute Summary
Attributes inherited from Resource
Class Method Summary collapse
-
.find(nimsp_id) ⇒ [Contribution]
Return contributions by industry.
Methods inherited from Contribution
Methods inherited from GovKit::FollowTheMoneyResource
Methods inherited from Resource
#initialize, instantiate, instantiate_collection, parse, #to_md5, #unload
Constructor Details
This class inherits a constructor from GovKit::Resource
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class GovKit::Resource
Class Method Details
.find(nimsp_id) ⇒ [Contribution]
Return contributions by industry.
134 135 136 137 138 139 140 |
# File 'lib/gov_kit/follow_the_money.rb', line 134 def self.find(nimsp_id) doc = get_xml("/candidates.industries.php", :query => {"imsp_candidate_id" => nimsp_id}) result = doc.search('//candidate_industry').collect { |x| x.attributes } stringify_values_of(result) parse(result) end |