Class: Google::Apis::CivicinfoV2::ElectoralDistrict
- Inherits:
-
Object
- Object
- Google::Apis::CivicinfoV2::ElectoralDistrict
- Includes:
- Google::Apis::Core::Hashable, Google::Apis::Core::JsonObjectSupport
- Defined in:
- lib/google/apis/civicinfo_v2/classes.rb,
lib/google/apis/civicinfo_v2/representations.rb,
lib/google/apis/civicinfo_v2/representations.rb
Overview
Describes the geographic scope of a contest.
Instance Attribute Summary collapse
-
#id ⇒ String
An identifier for this district, relative to its scope.
-
#name ⇒ String
The name of the district.
-
#scope ⇒ String
The geographic scope of this district.
Instance Method Summary collapse
-
#initialize(**args) ⇒ ElectoralDistrict
constructor
A new instance of ElectoralDistrict.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ ElectoralDistrict
Returns a new instance of ElectoralDistrict.
668 669 670 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 668 def initialize(**args) update!(**args) end |
Instance Attribute Details
#id ⇒ String
An identifier for this district, relative to its scope. For example, the 34th
State Senate district would have id "34" and a scope of stateUpper.
Corresponds to the JSON property id
653 654 655 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 653 def id @id end |
#name ⇒ String
The name of the district.
Corresponds to the JSON property name
658 659 660 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 658 def name @name end |
#scope ⇒ String
The geographic scope of this district. If unspecified the district's geography
is not known. One of: national, statewide, congressional, stateUpper,
stateLower, countywide, judicial, schoolBoard, cityWide, township,
countyCouncil, cityCouncil, ward, special
Corresponds to the JSON property scope
666 667 668 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 666 def scope @scope end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
673 674 675 676 677 |
# File 'lib/google/apis/civicinfo_v2/classes.rb', line 673 def update!(**args) @id = args[:id] if args.key?(:id) @name = args[:name] if args.key?(:name) @scope = args[:scope] if args.key?(:scope) end |