Class: PYR::Resource::Reps
- Inherits:
-
PYR::Resource
- Object
- PYR::Resource
- PYR::Resource::Reps
- Includes:
- GeoFindable
- Defined in:
- lib/pyr/resources/reps.rb
Overview
Resource object for sending requests to the /reps resource of the API
Instance Attribute Summary collapse
-
#chamber ⇒ Object
Read the chamber param.
-
#district ⇒ Object
Read the district param.
-
#party ⇒ Object
Read the party param.
-
#state ⇒ Object
Read the state param.
Attributes included from GeoFindable
#address, #generate, #lat, #long
Attributes inherited from PYR::Resource
Instance Method Summary collapse
-
#democrat=(boolean) ⇒ Object
Set the democrat boolean param.
-
#independent=(boolean) ⇒ Object
Set the independent boolean param.
-
#republican=(boolean) ⇒ Object
Set the republican boolean param.
Methods inherited from PYR::Resource
Constructor Details
This class inherits a constructor from PYR::Resource
Instance Attribute Details
#chamber ⇒ Object
Read the chamber param
19 20 21 |
# File 'lib/pyr/resources/reps.rb', line 19 def chamber @chamber end |
#district ⇒ Object
Read the district param
13 14 15 |
# File 'lib/pyr/resources/reps.rb', line 13 def district @district end |
#party ⇒ Object
Read the party param
16 17 18 |
# File 'lib/pyr/resources/reps.rb', line 16 def party @party end |
#state ⇒ Object
Read the state param
10 11 12 |
# File 'lib/pyr/resources/reps.rb', line 10 def state @state end |
Instance Method Details
#democrat=(boolean) ⇒ Object
Set the democrat boolean param
124 125 126 127 |
# File 'lib/pyr/resources/reps.rb', line 124 def democrat=(boolean) @democrat = Param.new(:democrat, boolean) params << @democrat end |