lib/barometer/extensions/graticule.rb in barometer-0.1.0 vs lib/barometer/extensions/graticule.rb in barometer-0.2.1

- old
+ new

@@ -1,12 +1,12 @@ module Graticule class Location - attr_accessor :country_code + attr_accessor :country_code, :address_line def attributes - [:latitude, :longitude, :street, :locality, :region, :postal_code, :country, :precision, :cuntry_code].inject({}) do |result,attr| + [:latitude, :longitude, :street, :locality, :region, :postal_code, :country, :precision, :cuntry_code, :address_line].inject({}) do |result,attr| result[attr] = self.send(attr) unless self.send(attr).blank? result end end @@ -37,9 +37,10 @@ l.locality = value(address.elements['.//LocalityName/text()']) l.region = value(address.elements['.//AdministrativeAreaName/text()']) l.postal_code = value(address.elements['.//PostalCodeNumber/text()']) l.country = value(address.elements['.//CountryName/text()']) l.country_code = value(address.elements['.//CountryNameCode/text()']) + l.address_line = value(address.elements['.//AddressLine/text()']) l.precision = PRECISION[address.attribute('Accuracy').value.to_i] || :unknown end end end \ No newline at end of file