Class: Village
- Inherits:
-
Object
- Object
- Village
- Defined in:
- lib/rwanda.rb
Instance Attribute Summary collapse
-
#cell ⇒ Object
Returns the value of attribute cell.
-
#district ⇒ Object
Returns the value of attribute district.
-
#province ⇒ Object
Returns the value of attribute province.
-
#sector ⇒ Object
Returns the value of attribute sector.
-
#village ⇒ Object
Returns the value of attribute village.
Instance Method Summary collapse
-
#initialize(row) ⇒ Village
constructor
def initialize(province, district, sector, cell, village).
- #to_s ⇒ Object
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
#cell ⇒ Object
Returns the value of attribute cell.
21 22 23 |
# File 'lib/rwanda.rb', line 21 def cell @cell end |
#district ⇒ Object
Returns the value of attribute district.
21 22 23 |
# File 'lib/rwanda.rb', line 21 def district @district end |
#province ⇒ Object
Returns the value of attribute province.
21 22 23 |
# File 'lib/rwanda.rb', line 21 def province @province end |
#sector ⇒ Object
Returns the value of attribute sector.
21 22 23 |
# File 'lib/rwanda.rb', line 21 def sector @sector end |
#village ⇒ Object
Returns the value of attribute village.
21 22 23 |
# File 'lib/rwanda.rb', line 21 def village @village end |
Instance Method Details
#to_s ⇒ Object
28 29 30 |
# File 'lib/rwanda.rb', line 28 def to_s "#{@province}/#{@district}/#{@sector}/#{@cell}/#{@village}" end |