Class: GovKit::OpenStates::State

Inherits:
GovKit::OpenStatesResource show all
Defined in:
lib/gov_kit/open_states.rb

Overview

The State class represents the state data returned from Open States.

For details about fields returned, see the Open States documentation, at openstates.sunlightlabs.com/api/metadata/,

Instance Attribute Summary

Attributes inherited from Resource

#attributes, #raw_response

Class Method Summary collapse

Methods inherited from GovKit::OpenStatesResource

get_uri

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_by_abbreviation(abbreviation) ⇒ Object



50
51
52
# File 'lib/gov_kit/open_states.rb', line 50

def self.find_by_abbreviation(abbreviation)
  get_uri("/metadata/#{abbreviation}/")
end