Class: Village

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(row) ⇒ Village

def initialize(province, district, sector, cell, village)



24
25
26
27
# File 'lib/rwanda.rb', line 24

def initialize(row)
  #@province,@district,@sector,@cell,@village=province,district,sector,cell,village
  @province,@district,@sector,@cell,@village=row['province'],row['district'],row['sector'],row['cell'],row['village']
end

Instance Attribute Details

#cellObject

Returns the value of attribute cell.



21
22
23
# File 'lib/rwanda.rb', line 21

def cell
  @cell
end

#districtObject

Returns the value of attribute district.



21
22
23
# File 'lib/rwanda.rb', line 21

def district
  @district
end

#provinceObject

Returns the value of attribute province.



21
22
23
# File 'lib/rwanda.rb', line 21

def province
  @province
end

#sectorObject

Returns the value of attribute sector.



21
22
23
# File 'lib/rwanda.rb', line 21

def sector
  @sector
end

#villageObject

Returns the value of attribute village.



21
22
23
# File 'lib/rwanda.rb', line 21

def village
  @village
end

Instance Method Details

#to_sObject



28
29
30
# File 'lib/rwanda.rb', line 28

def to_s
  "#{@province}/#{@district}/#{@sector}/#{@cell}/#{@village}"
end