Class: Geocodio::Canadian::ElectoralDistrictBase
- Inherits:
-
Object
- Object
- Geocodio::Canadian::ElectoralDistrictBase
- Defined in:
- lib/geocodio/canadian/electoral_district_base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#name_english ⇒ Object
Returns the value of attribute name_english.
-
#name_french ⇒ Object
Returns the value of attribute name_french.
-
#ocd_id ⇒ Object
Returns the value of attribute ocd_id.
-
#source ⇒ Object
Returns the value of attribute source.
Instance Method Summary collapse
-
#initialize(payload = {}) ⇒ ElectoralDistrictBase
constructor
A new instance of ElectoralDistrictBase.
- #name ⇒ Object
Constructor Details
#initialize(payload = {}) ⇒ ElectoralDistrictBase
Returns a new instance of ElectoralDistrictBase.
9 10 11 12 13 14 |
# File 'lib/geocodio/canadian/electoral_district_base.rb', line 9 def initialize(payload = {}) @ocd_id = payload['ocd_id'] @name_english = payload['name_english'] @name_french = payload['name_french'] @source = payload['source'] end |
Instance Attribute Details
#name_english ⇒ Object
Returns the value of attribute name_english.
6 7 8 |
# File 'lib/geocodio/canadian/electoral_district_base.rb', line 6 def name_english @name_english end |
#name_french ⇒ Object
Returns the value of attribute name_french.
5 6 7 |
# File 'lib/geocodio/canadian/electoral_district_base.rb', line 5 def name_french @name_french end |
#ocd_id ⇒ Object
Returns the value of attribute ocd_id.
4 5 6 |
# File 'lib/geocodio/canadian/electoral_district_base.rb', line 4 def ocd_id @ocd_id end |
#source ⇒ Object
Returns the value of attribute source.
7 8 9 |
# File 'lib/geocodio/canadian/electoral_district_base.rb', line 7 def source @source end |
Instance Method Details
#name ⇒ Object
16 17 18 |
# File 'lib/geocodio/canadian/electoral_district_base.rb', line 16 def name @name_english end |