Class: Pemilu::ElectoralDistrict

Inherits:
Object
  • Object
show all
Defined in:
lib/pemilu/electoral_district.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id: nil, name: nil, full_name: nil, legislative_body: nil, available_chairs: nil, population: nil, province: nil) ⇒ ElectoralDistrict

Returns a new instance of ElectoralDistrict.



6
7
8
9
10
11
12
13
14
# File 'lib/pemilu/electoral_district.rb', line 6

def initialize(id: nil, name: nil, full_name: nil, legislative_body: nil, available_chairs: nil, population: nil, province: nil)
  @id = id
  @name = name
  @full_name = full_name
  @legislative_body = legislative_body
  @available_chairs = available_chairs
  @population = population
  @province = province
end

Instance Attribute Details

#available_chairsObject (readonly)

Returns the value of attribute available_chairs.



4
5
6
# File 'lib/pemilu/electoral_district.rb', line 4

def available_chairs
  @available_chairs
end

#full_nameObject (readonly)

Returns the value of attribute full_name.



4
5
6
# File 'lib/pemilu/electoral_district.rb', line 4

def full_name
  @full_name
end

#idObject (readonly)

Returns the value of attribute id.



4
5
6
# File 'lib/pemilu/electoral_district.rb', line 4

def id
  @id
end

#legislative_bodyObject (readonly)

Returns the value of attribute legislative_body.



4
5
6
# File 'lib/pemilu/electoral_district.rb', line 4

def legislative_body
  @legislative_body
end

#nameObject (readonly)

Returns the value of attribute name.



4
5
6
# File 'lib/pemilu/electoral_district.rb', line 4

def name
  @name
end

#populationObject (readonly)

Returns the value of attribute population.



4
5
6
# File 'lib/pemilu/electoral_district.rb', line 4

def population
  @population
end

#provinceObject (readonly)

Returns the value of attribute province.



4
5
6
# File 'lib/pemilu/electoral_district.rb', line 4

def province
  @province
end