Class: OpenStates::District
- Inherits:
-
Object
- Object
- OpenStates::District
show all
- Includes:
- Model
- Defined in:
- lib/openstates/models/district.rb
Class Method Summary
collapse
Methods included from Model
included, #populate_from_hash!
Class Method Details
.api_method ⇒ Object
20
21
22
|
# File 'lib/openstates/models/district.rb', line 20
def api_method
:districts
end
|
.find(boundary_id) ⇒ Object
28
29
30
31
32
33
34
|
# File 'lib/openstates/models/district.rb', line 28
def find(boundary_id)
return if !boundary_id
response = OpenStates.district_boundaries(boundary_id)
from_hash(response)
end
|
.id_key ⇒ Object
24
25
26
|
# File 'lib/openstates/models/district.rb', line 24
def id_key
:boundary_id
end
|