Class: PYR::District
- Inherits:
-
ResponseObject
- Object
- LazyRecord::Base
- ResponseObject
- PYR::District
- Defined in:
- lib/pyr/response_objects/district.rb
Overview
The District is the response object that carries the data for a single congressional district.
Responds to the following attribute methods:
#self => The object's direct URI path
#full_code => Concatenation of the `state_code` and `district_code`.
A unique 4 digit identifier for each Congressional District,
and the primary key ID of the object.
#code => 2 digit district identifier. Not unique. The state must
provide context to indicate the exact district.
e.g. Minnesota's 4th district
#state_code => Unique 2 digit code for the State that contains
the district.
Instance Attribute Summary collapse
-
#code ⇒ Object
Returns the value of attribute code.
-
#full_code ⇒ Object
Returns the value of attribute full_code.
-
#self ⇒ Object
Returns the value of attribute self.
-
#state_code ⇒ Object
Returns the value of attribute state_code.
Method Summary
Methods inherited from ResponseObject
#call, #controller, #initialize
Constructor Details
This class inherits a constructor from PYR::ResponseObject
Instance Attribute Details
#code ⇒ Object
Returns the value of attribute code.
22 23 24 |
# File 'lib/pyr/response_objects/district.rb', line 22 def code @code end |
#full_code ⇒ Object
Returns the value of attribute full_code.
22 23 24 |
# File 'lib/pyr/response_objects/district.rb', line 22 def full_code @full_code end |
#self ⇒ Object
Returns the value of attribute self.
22 23 24 |
# File 'lib/pyr/response_objects/district.rb', line 22 def self @self end |
#state_code ⇒ Object
Returns the value of attribute state_code.
22 23 24 |
# File 'lib/pyr/response_objects/district.rb', line 22 def state_code @state_code end |