Class: Geocodio::StateLegislativeDistrict
- Inherits:
-
Object
- Object
- Geocodio::StateLegislativeDistrict
- Defined in:
- lib/geocodio/state_legislative_district.rb
Instance Attribute Summary collapse
-
#district_number ⇒ Object
Returns the value of attribute district_number.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(payload = {}) ⇒ StateLegislativeDistrict
constructor
A new instance of StateLegislativeDistrict.
Constructor Details
#initialize(payload = {}) ⇒ StateLegislativeDistrict
Returns a new instance of StateLegislativeDistrict.
6 7 8 9 |
# File 'lib/geocodio/state_legislative_district.rb', line 6 def initialize(payload = {}) @name = payload['name'] @district_number = payload['district_number'].to_i end |
Instance Attribute Details
#district_number ⇒ Object
Returns the value of attribute district_number.
4 5 6 |
# File 'lib/geocodio/state_legislative_district.rb', line 4 def district_number @district_number end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/geocodio/state_legislative_district.rb', line 3 def name @name end |