Class: Mityc::Geoportal::City

Inherits:
Object
  • Object
show all
Includes:
HTTParty, HappyMapper
Defined in:
lib/mityc-geoportal/city.rb

Class Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Class Attribute Details

.province_idObject

Returns the value of attribute province_id.



15
16
17
# File 'lib/mityc-geoportal/city.rb', line 15

def province_id
  @province_id
end

Class Method Details

.by_province(province_id) ⇒ Object



17
18
19
20
# File 'lib/mityc-geoportal/city.rb', line 17

def by_province(province_id)
  self.province_id = province_id
  @cities = self.parse(cities_xml)
end

Instance Method Details

#nameObject



10
11
12
# File 'lib/mityc-geoportal/city.rb', line 10

def name
  @name.strip
end