Class: GovKit::VoteSmart::Category

Inherits:
GovKit::VoteSmartResource show all
Defined in:
lib/gov_kit/vote_smart.rb

Instance Attribute Summary

Attributes inherited from Resource

#attributes, #raw_response

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



34
35
36
37
# File 'lib/gov_kit/vote_smart.rb', line 34

def self.list(state_id)
  response = get("/Rating.getCategories", :query => {"stateId" => state_id})
  parse(response['categories']['category'])
end