Class: GovKit::VoteSmart::Category
- Inherits:
-
GovKit::VoteSmartResource
- Object
- Resource
- GovKit::VoteSmartResource
- GovKit::VoteSmart::Category
- Defined in:
- lib/gov_kit/vote_smart.rb
Instance Attribute Summary
Attributes inherited from Resource
Class Method Summary collapse
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
.list(state_id) ⇒ Object
106 107 108 109 110 111 112 |
# File 'lib/gov_kit/vote_smart.rb', line 106 def self.list(state_id) response = get("/Rating.getCategories", :query => {"stateId" => state_id}) raise(ResourceNotFound, response['error']['errorMessage']) if response['error'] parse(response['categories']['category']) end |